diff --git a/customer-apigateway-service/build.gradle b/customer-apigateway-service/build.gradle index b8cc022..81c1887 100644 --- a/customer-apigateway-service/build.gradle +++ b/customer-apigateway-service/build.gradle @@ -33,6 +33,8 @@ dependencies { implementation 'javax.xml.bind:jaxb-api:2.3.1' + implementation 'org.springframework.cloud:spring-cloud-starter-config' + compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.projectlombok:lombok' diff --git a/customer-apigateway-service/src/main/resources/application.yml b/customer-apigateway-service/src/main/resources/application.yml index c3cb663..cd5b875 100644 --- a/customer-apigateway-service/src/main/resources/application.yml +++ b/customer-apigateway-service/src/main/resources/application.yml @@ -18,8 +18,11 @@ eureka: spring: application: name: customer-apigateway-service - + config: + import: optional:configserver:http://127.0.0.1:8888 cloud: + config: + name: bootstrap gateway: default-filters: - name: GlobalFilter diff --git a/notification-service/build.gradle b/notification-service/build.gradle index 3e1fa5f..61c08b0 100644 --- a/notification-service/build.gradle +++ b/notification-service/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' /*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/ - /*implementation 'org.springframework.cloud:spring-cloud-starter-config'*/ + implementation 'org.springframework.cloud:spring-cloud-starter-config' /*implementation 'org.springframework.kafka:spring-kafka'*/ // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' diff --git a/notification-service/src/main/resources/application.yml b/notification-service/src/main/resources/application.yml index b626e09..73b902a 100644 --- a/notification-service/src/main/resources/application.yml +++ b/notification-service/src/main/resources/application.yml @@ -3,6 +3,11 @@ server.port: 0 spring: application: name: notification-service + config: + import: optional:configserver:http://127.0.0.1:8888 + cloud: + config: + name: service datasource: url: jdbc:postgresql://localhost:5432/notificationdb @@ -12,7 +17,7 @@ spring: jpa: hibernate: - ddl-auto: validate + ddl-auto: create-drop generate-ddl: true open-in-view: false properties: diff --git a/order-service/build.gradle b/order-service/build.gradle index a692e77..4a67778 100644 --- a/order-service/build.gradle +++ b/order-service/build.gradle @@ -34,7 +34,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' /*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/ /*implementation 'org.springframework.boot:spring-boot-starter-security'*/ - /*implementation 'org.springframework.cloud:spring-cloud-starter-config'*/ + implementation 'org.springframework.cloud:spring-cloud-starter-config' implementation 'org.springframework.kafka:spring-kafka' // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' diff --git a/order-service/src/main/resources/application.yml b/order-service/src/main/resources/application.yml index 3a554d1..dbfd1ae 100644 --- a/order-service/src/main/resources/application.yml +++ b/order-service/src/main/resources/application.yml @@ -4,6 +4,11 @@ server: spring: application: name: order-servcie + config: + import: optional:configserver:http://127.0.0.1:8888 + cloud: + config: + name: service jpa: hibernate: diff --git a/owner-apigateway-service/build.gradle b/owner-apigateway-service/build.gradle index 6986aa8..7abb636 100644 --- a/owner-apigateway-service/build.gradle +++ b/owner-apigateway-service/build.gradle @@ -32,6 +32,7 @@ dependencies { implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' // https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api implementation 'javax.xml.bind:jaxb-api:2.3.1' + implementation 'org.springframework.cloud:spring-cloud-starter-config' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' diff --git a/owner-apigateway-service/src/main/resources/application.yml b/owner-apigateway-service/src/main/resources/application.yml index 1863e18..12ed61b 100644 --- a/owner-apigateway-service/src/main/resources/application.yml +++ b/owner-apigateway-service/src/main/resources/application.yml @@ -3,16 +3,24 @@ server: eureka: client: - fetch-registry: true - register-with-eureka: true service-url: - defalutZone: http://localhost:8761/eureka + fetch-registry: true + register-with-eureka: true + defaultZone: http://localhost:8761/eureka + + spring: application: name: owner-apigateway-service - + profiles: + default: dev + config: + import: optional:configserver:http://127.0.0.1:8888 cloud: + config: + name: bootstrap + gateway: default-filters: - name: GlobalFilter @@ -93,6 +101,7 @@ spring: - RewritePath=/user-service/(?.*),/$\{segment} - AuthorizationHeaderFilter + token: access-expired-time: 3600000 refresh-expired-time: 604800000 diff --git a/store-service/build.gradle b/store-service/build.gradle index 9a68dd2..bf6e846 100644 --- a/store-service/build.gradle +++ b/store-service/build.gradle @@ -34,14 +34,16 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' /*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/ /*implementation 'org.springframework.boot:spring-boot-starter-security'*/ - /*implementation 'org.springframework.cloud:spring-cloud-starter-config'*/ + implementation 'org.springframework.cloud:spring-cloud-starter-config' /*implementation 'org.springframework.kafka:spring-kafka'*/ // https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' + compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'org.postgresql:postgresql' + runtimeOnly 'mysql:mysql-connector-java' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' // testImplementation 'org.springframework.amqp:spring-rabbit-test' diff --git a/store-service/src/main/resources/application.yml b/store-service/src/main/resources/application.yml index 41f9bbb..c64a878 100644 --- a/store-service/src/main/resources/application.yml +++ b/store-service/src/main/resources/application.yml @@ -4,6 +4,11 @@ server: spring: application: name: store-servcie + config: + import: optional:configserver:http://127.0.0.1:8888 + cloud: + config: + name: service jpa: hibernate: