I think there's something missing. Maybe just documentation? A simple app with the config starter no longer tries to connect to the config server on startup. It looks like maybe I need to set spring.config.import=optional:configserver:http://localhost:8888
to get back to the old default behaviour? Maybe we could make that the default again to make it easier to migrate existing apps?
Comment From: spencergibb
Yeah, for 2.4.x. if you also set the legacy processing to true it works like the old way
Comment From: dsyer
Why wouldn't we want it to work the same out of the box?
Comment From: ttomsu
We're also seeing this issue. The call is made to the Config server but it's not actually applied (and isn't listed in the propertySources
of /actuator/env
)
Proof it's being called:
2020-09-16 10:54:06.193 INFO 1030715 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2020-09-16 10:54:06.272 INFO 1030715 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=application, profiles=[default], label=null, version=null, state=null
2020-09-16 10:54:06.273 INFO 1030715 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, BootstrapPropertySource {name='bootstrapProperties-file:/tmp/config/application.properties'}]
Comment From: spencergibb
Bootstrap is optional and you need to enable it by using spring.cloud.bootstrap.enabled=true
. We're migrating to the new spring.config.import
model by default.
Comment From: spencergibb
Library maintainers that want bootstrap enabled without user intervention can include the new spring-cloud-starter-bootstrap
.
Comment From: spencergibb
@ttomsu it would only run with certain conditions. This is only on boot 2.4 and spring cloud 2020.0
Comment From: celcius112
I was also a bit lost before stumbling on this issue. Some documentation would be great.
However, as default behavior, couldn't spring-cloud-config configure the spring.config.import=optional:configserver
property using the spring.cloud.config.uri
one ? As far as I see the uri
property becomes useless there
Comment From: patpatpat123
Same here,
Would be great to have some tutorial on this new 2.4.x without bootstrap way to use spring cloud config server please :)
Thank you
Comment From: imod
where is this new documentation published too? I can't find the updated text on https://cloud.spring.io/spring-cloud-config/reference/html
Comment From: spencergibb
https://docs.spring.io/spring-cloud/docs/2020.0.0/reference/html/
Comment From: venkatesh-007
@spencergibb how to add multiple config server URIs for HA with this import property? Is it separated with ':'
Comment From: spencergibb
use the spring.cloud.config.uri
property with spring.config.import=configserver: