И клиент в этом репозитории
Далее приведен мой POM-файл
Код: Выделить всё
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.1.8.RELEASE
com.ali.wassouf.spring.cloud.client
cloud-config-app
0.0.1-SNAPSHOT
cloud-config-app
Demo project for Spring Boot
1.8
Greenwich.RELEASE
org.springframework.cloud
spring-cloud-config-server
org.springframework.boot
spring-boot-starter-actuator
org.springframework.cloud
spring-cloud-starter-stream-rabbit
org.springframework.cloud
spring-cloud-config-monitor
org.springframework.boot
spring-boot-starter-test
test
org.springframework.cloud
spring-cloud-dependencies
${spring-cloud.version}
pom
import
org.springframework.boot
spring-boot-maven-plugin
Код: Выделить всё
server:
port: 8081
spring:
application:
name: cloud-config-server
cloud:
config:
server:
monitor:
github:
enabled: true
gitee:
enabled: true
git:
password: ${PASSWORD}
username: ${USERNAME}
uri: https://github.com/Ali-Wassouf/springcloudconfigrepo
search-paths: '{application}'
Код: Выделить всё
.
+-- serviceA
| +-- application-dev.properties
| +-- application-prod.properties
+-- serviceB
| +-- application-dev.properties
| +-- application-prod.properties
У меня также есть изображение RabbitMQ, работающее локально.
Когда я отправляю свои изменения в репозиторий конфигурации я получаю эту строку на консоли
Код: Выделить всё
o.s.c.c.monitor.PropertyPathEndpoint : Refresh for: *:prod
s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2c943d8f: startup date [Mon Nov 23 18:55:19 CET 2020]; root of context hierarchy
o.s.core.annotation.AnnotationUtils : Failed to introspect annotations on [class org.springframework.cloud.config.client.ConfigServiceBootstrapConfiguration$RetryConfiguration]: java.lang.IllegalStateException: Could not obtain annotation attribute value for public abstract java.lang.Class[] org.springframework.boot.autoconfigure.condition.ConditionalOnClass.value()
trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$aacb9e64] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7d2d9a8f: startup date [Mon Nov 23 18:55:20 CET 2020]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2c943d8f
o.s.boot.SpringApplication : Started application in 1.515 seconds (JVM running for 31.102)
s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@7d2d9a8f: startup date [Mon Nov 23 18:55:20 CET 2020]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@2c943d8f
s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2c943d8f: startup date [Mon Nov 23 18:55:19 CET 2020]; root of context hierarchy
o.s.cloud.bus.event.RefreshListener : Received remote refresh request. Keys refreshed []
Я пытался перейти на более старую версию Spring Boot/Cloud, а также на более новую версию, но это не сработало.< /p>
Я видел вопросы, похожие на мой случай, но ни на один из них не было ответов.
Подробнее здесь: https://stackoverflow.com/questions/649 ... eshed-keys
Мобильная версия