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 'javax.xml.bind:jaxb-api:2.3.1'
|
||||||
|
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-config'
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
compileOnly 'org.projectlombok:lombok'
|
||||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
annotationProcessor 'org.projectlombok:lombok'
|
||||||
|
|||||||
@@ -18,8 +18,11 @@ eureka:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: customer-apigateway-service
|
name: customer-apigateway-service
|
||||||
|
config:
|
||||||
|
import: optional:configserver:http://127.0.0.1:8888
|
||||||
cloud:
|
cloud:
|
||||||
|
config:
|
||||||
|
name: bootstrap
|
||||||
gateway:
|
gateway:
|
||||||
default-filters:
|
default-filters:
|
||||||
- name: GlobalFilter
|
- name: GlobalFilter
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ dependencies {
|
|||||||
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
|
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
|
||||||
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
|
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
|
||||||
/*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/
|
/*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'*/
|
/*implementation 'org.springframework.kafka:spring-kafka'*/
|
||||||
// https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter
|
// https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter
|
||||||
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
|
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ server.port: 0
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: notification-service
|
name: notification-service
|
||||||
|
config:
|
||||||
|
import: optional:configserver:http://127.0.0.1:8888
|
||||||
|
cloud:
|
||||||
|
config:
|
||||||
|
name: service
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:postgresql://localhost:5432/notificationdb
|
url: jdbc:postgresql://localhost:5432/notificationdb
|
||||||
@@ -12,7 +17,7 @@ spring:
|
|||||||
|
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
ddl-auto: validate
|
ddl-auto: create-drop
|
||||||
generate-ddl: true
|
generate-ddl: true
|
||||||
open-in-view: false
|
open-in-view: false
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ dependencies {
|
|||||||
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
|
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
|
||||||
/*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/
|
/*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/
|
||||||
/*implementation 'org.springframework.boot:spring-boot-starter-security'*/
|
/*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'
|
implementation 'org.springframework.kafka:spring-kafka'
|
||||||
// https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter
|
// https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter
|
||||||
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
|
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: order-servcie
|
name: order-servcie
|
||||||
|
config:
|
||||||
|
import: optional:configserver:http://127.0.0.1:8888
|
||||||
|
cloud:
|
||||||
|
config:
|
||||||
|
name: service
|
||||||
|
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ dependencies {
|
|||||||
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64'
|
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64'
|
||||||
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
|
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
|
||||||
implementation 'javax.xml.bind:jaxb-api:2.3.1'
|
implementation 'javax.xml.bind:jaxb-api:2.3.1'
|
||||||
|
implementation 'org.springframework.cloud:spring-cloud-starter-config'
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
compileOnly 'org.projectlombok:lombok'
|
||||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
|
|||||||
@@ -3,16 +3,24 @@ server:
|
|||||||
|
|
||||||
eureka:
|
eureka:
|
||||||
client:
|
client:
|
||||||
fetch-registry: true
|
|
||||||
register-with-eureka: true
|
|
||||||
service-url:
|
service-url:
|
||||||
defalutZone: http://localhost:8761/eureka
|
fetch-registry: true
|
||||||
|
register-with-eureka: true
|
||||||
|
defaultZone: http://localhost:8761/eureka
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: owner-apigateway-service
|
name: owner-apigateway-service
|
||||||
|
profiles:
|
||||||
|
default: dev
|
||||||
|
config:
|
||||||
|
import: optional:configserver:http://127.0.0.1:8888
|
||||||
cloud:
|
cloud:
|
||||||
|
config:
|
||||||
|
name: bootstrap
|
||||||
|
|
||||||
gateway:
|
gateway:
|
||||||
default-filters:
|
default-filters:
|
||||||
- name: GlobalFilter
|
- name: GlobalFilter
|
||||||
@@ -93,6 +101,7 @@ spring:
|
|||||||
- RewritePath=/user-service/(?<segment>.*),/$\{segment}
|
- RewritePath=/user-service/(?<segment>.*),/$\{segment}
|
||||||
- AuthorizationHeaderFilter
|
- AuthorizationHeaderFilter
|
||||||
|
|
||||||
|
|
||||||
token:
|
token:
|
||||||
access-expired-time: 3600000
|
access-expired-time: 3600000
|
||||||
refresh-expired-time: 604800000
|
refresh-expired-time: 604800000
|
||||||
|
|||||||
@@ -34,14 +34,16 @@ dependencies {
|
|||||||
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
|
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
|
||||||
/*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/
|
/*implementation 'org.springframework.boot:spring-boot-starter-amqp'*/
|
||||||
/*implementation 'org.springframework.boot:spring-boot-starter-security'*/
|
/*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'*/
|
/*implementation 'org.springframework.kafka:spring-kafka'*/
|
||||||
// https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter
|
// https://mvnrepository.com/artifact/com.github.gavlyukovskiy/p6spy-spring-boot-starter
|
||||||
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
|
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
|
||||||
|
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
compileOnly 'org.projectlombok:lombok'
|
||||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
runtimeOnly 'org.postgresql:postgresql'
|
runtimeOnly 'org.postgresql:postgresql'
|
||||||
|
runtimeOnly 'mysql:mysql-connector-java'
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
annotationProcessor 'org.projectlombok:lombok'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
// testImplementation 'org.springframework.amqp:spring-rabbit-test'
|
// testImplementation 'org.springframework.amqp:spring-rabbit-test'
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: store-servcie
|
name: store-servcie
|
||||||
|
config:
|
||||||
|
import: optional:configserver:http://127.0.0.1:8888
|
||||||
|
cloud:
|
||||||
|
config:
|
||||||
|
name: service
|
||||||
|
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
|
|||||||
Reference in New Issue
Block a user