admin管理员组文章数量:1201590
My project uses Spring Cloud Consul to check for configuration changes. My application.yml contains:
spring:
application:
name: myApp
config:
watch:
delay: 30000
import:
- "consul:"
cloud:
consul:
host: localhost
port: 8500
token: xxxx
config:
enabled: true
discovery:
enabled: false
catalogServicesWatch.enabled: false
With this configuration, Spring Cloud Consul always checks four locations
- v1/kv/config/application
- v1/kv/config/application,default
- v1/kv/config/myApp
- v1/kv/config/myApp,default
In my environment, the ", default" location does not exist so these checks result in 404s. I would like to disable the profile checks all together and just use the config/application and config/myApp locations. Is there any way to do this?
I tried settings spring.profiles.exclude: default but this resulted in the same behavior as mentioned above as it appears spring will default to "default" if no active profile.
If I do set the default profile, Spring will use that profile name in the configuration path, and again it will result in 404s.
I do not see a way to resolve this to avoid the 404s in my environment.
本文标签:
版权声明:本文标题:Is there a way to prevent Spring Cloud Consul from looking for config changes in any profile locations? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738617979a2103021.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论