New to spring boot. Using config server to decentralize properties based on profile.
bootstrap.yml:
spring:
application:
name: nameoftheapp
profiles:
active: profilehere
cloud:
config:
uri: https://someurlhere
application.properties:
some other key value pairs goes here
spring.application.name=nameofthedummyapp
console log:-
XXX
2019-06-27 16:26:37.929 DEBUG [xxx,,,] 22564 --- [ main] o.s.web.client.RestTemplate : Created GET request for "https://someurlhere/nameofthedummyapp/profilehere"
XXXX
But what I thought was, https://someurlhere/nameoftheapp/profilehere
.
It seems, spring boot picked spring.application.name from the application.properties instead of bootstrap.yml. Commenting out in application.properties solved the issue.
What I have seen in examples are, for accessing the config server, spring boot is making use of bootstrap.yml. By mistake, I had conflicting names at both places.
But curious to know,
- whether spring boot is picking up from in approriate place? or
- Did the later loaded profile (application.properties) override the first loaded profile(bootstrap.yml)?
Little confused here.
Could someone share some insights here?