refactor(services): 개발 , 운영 설정 분리
- cloud config 서버에 운영설정 저장 - profile을 통해서 운영/개발 설정분리
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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>.*),/$\{segment}
|
||||
- AuthorizationHeaderFilter
|
||||
|
||||
|
||||
token:
|
||||
access-expired-time: 3600000
|
||||
refresh-expired-time: 604800000
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user