使用spring cloud config报错Fetching config from server at : http://localhost:8888
原因是application.yml启动优先级小于bootstrap.yml。将application.yml重命名为bootstrap.yml即可。
·
server:
port: 10080
spring:
application:
name: config
cloud:
config:
server:
git:
uri: http://gitlab:8050/ecms-java/ecms-java-config.git
search-paths: config-repo
username: root
password: 123456
eureka:
instance:
lease-expiration-duration-in-seconds: 15
lease-renewal-interval-in-seconds: 5
client:
registry-fetch-interval-seconds: 5
service-url:
defaultZone: http://ecms-registry:10070/eureka/
#关闭Spring Boot Actuator的健康监控,如果不关闭则会自动连接redis然后报错Redis health check failed
management:
health:
redis:
enabled: false
2020-01-07 10:21:37.305 INFO 4816 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
原因是application.yml启动优先级小于bootstrap.yml
将application.yml重命名为bootstrap.yml即可

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)