I have the configserver in my setup with native as source for configs.
The corresponding config in the application.yaml of the config server:
spring:
application:
name: confighub
profiles:
active: native
cloud:
config:
server:
health.enabled: false
native:
searchLocations: classpath:/configs
Before the upgrade to spring boot 2.4 I used bootstrap.yaml with 2.3.x and older, then I had no ptoblem to have globally shared configs in the application.yaml, which resides in .../resources/configs.
But now the values are missing from the file. According to the documentation, the configserver config files are omitted (which is good):
“With the “native” profile (a local file system backend) , you should use an explicit search location that is not part of the server’s own configuration. Otherwise, the application* resources in the default search locations get removed because they are part of the server.”
But the application.yaml in the configs directory is not part of the configservers configuration file, the basename is just the same.
I just did a quick check in the configserver source, but it seems like the org.springframework.cloud.config.server.environment.NativeEnvironmentRepository#clean method may clean the application.yaml even when it resides in a different directory, which is wrong from my point of view.
Did I understand something wrong or is there a bug?
I have the configserver in my setup with native as source for configs.
The corresponding config in the application.yaml of the config server:
Before the upgrade to spring boot 2.4 I used bootstrap.yaml with 2.3.x and older, then I had no ptoblem to have globally shared configs in the application.yaml, which resides in
.../resources/configs.But now the values are missing from the file. According to the documentation, the configserver config files are omitted (which is good):
But the application.yaml in the configs directory is not part of the configservers configuration file, the basename is just the same.
I just did a quick check in the configserver source, but it seems like the
org.springframework.cloud.config.server.environment.NativeEnvironmentRepository#cleanmethod may clean the application.yaml even when it resides in a different directory, which is wrong from my point of view.Did I understand something wrong or is there a bug?