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

Comment From: jlippmann

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 !

Comment From: flashvayne

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.

Comment From: flashvayne

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

Comment From: illialean

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.

Comment From: magnus-larsson

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

Comment From: adamleantech

this appears to be resolved with 4.1.1