关于Spring整合是报错Could not locate PropertySource: I/O error on GET request for “http://localhost:8888/
Could not locate PropertySource: I/O error on GET request for “http://localhost:8888/hzero-swagger/default”这是因为Spring中默认配置中心的port是8888如果未配置Spring cloud的地址就会默认连接此端口地址。可以加上如下配置,修复配置中心地址到正确的地址。spring:pro
·
Could not locate PropertySource: I/O error on GET request for “http://localhost:8888/hzero-swagger/default”
这是因为Spring中默认配置中心的port是8888如果未配置Spring cloud的地址就会默认连接此端口地址。可以加上如下配置,修复配置中心地址到正确的地址。
spring:
profiles:
active: ${SPRING_PROFILES_ACTIVE:default}
cloud:
config:
fail-fast: false
# 是否启用配置中心
enabled: ${SPRING_CLOUD_CONFIG_ENABLED:false}
# 配置中心地址
uri: ${SPRING_CLOUD_CONFIG_URI:http://localhost:8010}
retry:
# 最大重试次数
maxAttempts: 6
multiplier: 1.1
# 重试间隔时间
maxInterval: 2000
# 标签
label: ${SPRING_CLOUD_CONFIG_LABEL:}
更多推荐
已为社区贡献1条内容
所有评论(0)