spring cloud : spring cloud bus - rabbitmq(amqp)

This commit is contained in:
haerong22
2021-10-02 20:28:00 +09:00
parent 477d04060e
commit 35be135132
8 changed files with 45 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
implementation group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
implementation group: 'javax.xml.bind', name: 'jaxb-api'

View File

@@ -12,6 +12,12 @@ spring:
application:
name: apigateway-service
rabbitmq:
host: 127.0.0.1
port: 5672
username: guest
password: guest
cloud:
gateway:
default-filters:
@@ -95,4 +101,4 @@ management:
endpoints:
web:
exposure:
include: refresh, health, beans, httptrace
include: refresh, health, beans, httptrace, busrefresh

View File

@@ -2,7 +2,7 @@ spring:
cloud:
config:
uri: http://127.0.0.1:8888
name: ecommerce
name: config-service
profiles:
active: dev
# profiles:
# active: dev

View File

@@ -17,7 +17,12 @@ ext {
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.cloud:spring-cloud-config-server'
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

View File

@@ -4,17 +4,29 @@ server:
spring:
application:
name: config-server
rabbitmq:
host: 127.0.0.1
port: 5672
username: guest
password: guest
profiles:
active: native
cloud:
config:
server:
native:
search-locations: file:///${user.home}/Desktop/study/native
# search-locations: file://${user.home}/Desktop/kim/study/native
# search-locations: file:///${user.home}/Desktop/study/native
search-locations: file://${user.home}/Desktop/kim/study/native
git:
uri: file://C:/Users/Woojin/Desktop/study/config
# uri: file:///Users/bobby/Desktop/kim/study/config
# uri: file://C:/Users/Woojin/Desktop/study/config
uri: file:///Users/bobby/Desktop/kim/study/config
# uri: [github_uri]
# username: [your username]
# password: [your password]
# password: [your password]
management:
endpoints:
web:
exposure:
include: health, busrefresh

View File

@@ -30,6 +30,7 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'

View File

@@ -4,6 +4,13 @@ server:
spring:
application:
name: user-service
rabbitmq:
host: 127.0.0.1
port: 5672
username: guest
password: guest
h2:
console:
enabled: true
@@ -36,7 +43,7 @@ management:
endpoints:
web:
exposure:
include: refresh, health, beans
include: refresh, health, beans, busrefresh
#token:
# expiration_time: 86400000

View File

@@ -2,6 +2,6 @@ spring:
cloud:
config:
uri: http://127.0.0.1:8888
name: ecommerce
profiles:
active: dev
name: config-service
# profiles:
# active: dev