Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specific config properties can't be loaded in v4.0.3 #2293

Open
flashvayne opened this issue Jun 20, 2023 · 6 comments
Open

specific config properties can't be loaded in v4.0.3 #2293

flashvayne opened this issue Jun 20, 2023 · 6 comments

Comments

@flashvayne
Copy link

After I upgrade version of spring-cloud-config-client to 4.0.3 from 4.0.2, specific properties from config-server can't be loaded.
I made a demo to reproduce this. please refer to it.
https://github.com/flashvayne/demo-issue-spring-cloud-config

I saw the source code and I think it is caused by the filter method.
https://github.com/spring-cloud/spring-cloud-config/blob/v4.0.3/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java#L196

@jlippmann
Copy link

Cuts the first character, if the applicationName does NOT contain a slash !

@flashvayne
Copy link
Author

Cuts the first character, if the applicationName does NOT contain a slash !

It's correct. Also StringIndexOutOfBoundsException occurs in my demo due to the code.

@flashvayne
Copy link
Author

flashvayne commented Jun 20, 2023

Even if StringIndexOutOfBoundsException was not thrown, my profile "uat" would not be loaded.
As for below code, in my demo, the value of propertySource.getName() is
configserver:Config resource 'class path resource [config-file/application.yml]' via location 'classpath:/config-file/' (document #0) which doesn't match the profile.

@illialean
Copy link

Have the same issue - no longer able to load properties from configuration server after update to 4.0.3 (as part of update to spring cloud 2022.0.3). Had to roll back to 4.0.2.

@magnus-larsson
Copy link

The problem remains in 4.0.4; also had to roll back to 4.0.2

@adamleantech
Copy link

this appears to be resolved with 4.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants