Open ewolff opened 8 years ago
It's not wrong if you aren't using consul config. But it does need to be noted similar to what we did in zookeeper: http://cloud.spring.io/spring-cloud-zookeeper/spring-cloud-zookeeper.html#_registering_with_zookeeper
In fact, it's already there: https://github.com/spring-cloud/spring-cloud-consul/blob/master/docs/src/main/asciidoc/spring-cloud-consul.adoc#registering-with-consul
The site just needs to be updated.
Actually I'm not using Consul nor Spring Cloud Config...
I'm confused then. When you said "I'm not using Consul" I assume you mean "Consul Config". If you are using spring-cloud-starter-consul-all
or spring-cloud-starter-consul-config
, then it will need to go in bootstrap, otherwise it shouldn't. If that's not the case, can you describe your setup?
You are right - I'm not using Consul Config but also not Spring Cloud Config.
Which starter are you using, spring-cloud-starter-consul-all
or spring-cloud-starter-consul-discovery
?
spring-cloud-starter-consul-all
OK, so your app is using consul config even though you don't want it to. If you use spring-cloud-starter-consul-discovery
you should be able to use application.properties
instead of bootstrap.properties
.
Thanks for the tip! 😄
I'll keep this open to clarify in the docs which to use based on which starter you are using.
http://cloud.spring.io/spring-cloud-consul/spring-cloud-consul.html says that spring.cloud.consul.host and spring.cloud.consul.port should be changed in application.yml. This is wrong - it only works if it is set in bootstrap.properties. I did not try .yml but assume it is the same.