This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <parent> | |
| <groupId>org.springframework.boot</groupId> | |
| <artifactId>spring-boot-starter-parent</artifactId> | |
| <version>2.1.7.RELEASE</version> | |
| <relativePath/> <!-- lookup parent from repository --> | |
| </parent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.thinkmicroservices.ri.spring.gateway; | |
| import javax.annotation.PostConstruct; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication | |
| @Slf4j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spring: | |
| application: | |
| name: API-GATEWAY-SERVICE | |
| cloud: | |
| config: | |
| fail-fast: true | |
| retry: | |
| max-attempts: 10 | |
| initial-interval: 1500 | |
| multiplier: 1.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server: | |
| port: 8080 | |
| eureka: | |
| client: | |
| serviceUrl: | |
| defaultZone: http://localhost:8761/eureka | |
| spring: | |
| cloud.gateway: | |
| discovery: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # grab the base image | |
| FROM openjdk:8-jdk-alpine | |
| # install curl | |
| RUN apk add --update \ | |
| curl \ | |
| && rm -rf /var/cache/apk/* | |
| # create a working volume in tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## docker-compose -f ./dc-04-authentication.yml up -d | |
| version: "3.7" | |
| services: | |
| ############################################################## | |
| # INFRASTRUCTURE SERVICES | |
| ################ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ | |
| # Postgres # | |
| ############ | |
| postgresDB: | |
| image: postgres | |
| restart: always | |
| ports: | |
| - 5432:5432 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.thinkmicroservices.ri.spring.auth.repository.model; | |
| import com.fasterxml.jackson.annotation.JsonIgnore; | |
| import java.util.Set; | |
| import javax.persistence.*; | |
| import lombok.*; | |
| /** | |
| * | |
| * @author cwoodward |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.thinkmicroservices.ri.spring.auth.repository.model; | |
| import com.fasterxml.jackson.annotation.JsonIgnore; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import javax.persistence.*; | |
| import lombok.*; | |
| /** | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.thinkmicroservices.ri.spring.auth.repository; | |
| import org.springframework.data.repository.CrudRepository; | |
| import org.springframework.stereotype.Repository; | |
| import com.thinkmicroservices.ri.spring.auth.repository.model.User; | |
| import java.util.Collection; | |
| import java.util.List; | |
| import org.springframework.data.domain.Page; | |
| import org.springframework.data.domain.Pageable; | |
| import org.springframework.data.jpa.repository.Query; |