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?
Yeah, for 2.4.x. if you also set the legacy processing to true it works like the old way
Why wouldn't we want it to work the same out of the box?
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'}]
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.
Library maintainers that want bootstrap enabled without user intervention can include the new spring-cloud-starter-bootstrap.
@ttomsu it would only run with certain conditions. This is only on boot 2.4 and spring cloud 2020.0
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
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
where is this new documentation published too? I can't find the updated text on https://cloud.spring.io/spring-cloud-config/reference/html
Most helpful comment
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:configserverproperty using thespring.cloud.config.urione ? As far as I see theuriproperty becomes useless there