reason: Load Apollo Config failed - appId: demo-consumer-movie-apollo, cluster: default, namespace:

spring 获取apollo配置文件 由于自动添加 yml 后缀导致获取不到配置文件

Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository, reason: Load Apollo Config failed - appId: demo-consumer-movie-apollo, cluster: default, namespace: demo, url: http://discovery:8780/configs/demo-consumer-movie-apollo/default/demo.yml?ip=192.168.100.245 [Cause: [status code: 404] Could not find config for namespace - appId: demo-consumer-movie-apollo, cluster: default, namespace: demo, please check whether the configs are released in Apollo!]

原因未知,我的版本apollo client 1.7.0
一般就是namespace命名空间不对引起的,可以使用不带后缀的试试,
还有可以重新用mven 拉取更新下apollo ,我的一时无论怎么改都不好,后来重新拉取了依赖,偶然间就好了

你可能感兴趣的:(java)