Spring Cloud Config Server 在启动时找不到 PropertySource [英] Spring Cloud Config Server Can't locate PropertySource on startup
本文介绍了Spring Cloud Config Server 在启动时找不到 PropertySource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我启动 Spring Cloud Config Server 时,出现以下错误.
When I start my Spring Cloud Config Server I get the following error.
Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/configserver/default/master":Connection refused; nested exception is java.net.ConnectException: Connection refused
但是,当我在浏览器中点击该 URL 时,它存在并且配置服务器正在工作.这是怎么回事?
However when I hit that URL in my browser it exists and the config server is working. What is going on?
应用程序.yml
server:
port: 8888
management:
context-path: /admin
logging:
level:
com.netflix.discovery: 'OFF'
org.springframework.cloud: 'DEBUG'
spring:
cloud:
config:
server:
git:
uri: file:/home/dev/configs
bootstrap.yml
bootstrap.yml
spring:
application:
name: configserver
推荐答案
如果您的配置服务器不打算作为配置客户端,您需要设置 spring.cloud.config.enabled=false
避免该日志条目(虽然它是无害的).
If your config server is not intended to be a config client as well you need to set spring.cloud.config.enabled=false
to avoid that log entry (it's harmless though).
这篇关于Spring Cloud Config Server 在启动时找不到 PropertySource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文