specific config properties can't be loaded in v4.0.3
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
https://github.com/spring-cloud/spring-cloud-config/blob/662d9a8084b9c917242b99f1d50d6d4c667b89d7/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java#L223
Cuts the first character, if the applicationName does NOT contain a slash !
https://github.com/spring-cloud/spring-cloud-config/blob/662d9a8084b9c917242b99f1d50d6d4c667b89d7/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java#L223
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.
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.
https://github.com/spring-cloud/spring-cloud-config/blob/662d9a8084b9c917242b99f1d50d6d4c667b89d7/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java#L208
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.
The problem remains in 4.0.4; also had to roll back to 4.0.2
this appears to be resolved with 4.1.1