问题
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
However when I hit that URL in my browser it exists and the config server is working. What is going on?
application.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
spring:
application:
name: configserver
回答1:
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).
回答2:
The eureka.client.serviceUrl.defaultZone and spring.cloud.config.* configuration in the bootstrap yml file


来源:https://stackoverflow.com/questions/28375416/spring-cloud-config-server-cant-locate-propertysource-on-startup