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
When classes in spring-core and spring-boot are loaded by different ClassLoaders, spring-boot cannot find its own config data location resolvers #26149
Conversation
To pass appropriate classloader as an argument to load factory names similar to spring boot versions < 2.4.0
@vsriram92 Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@vsriram92 Thank you for signing the Contributor License Agreement! |
Getting Checkstyle and formatting issue in the build. As a newbie, not sure what it expects / what rules it follows. |
Thanks for the PR, @vsriram92. If you run the build locally, as you should before submitting a PR, the output should explain what the problems are. In the case of the formatting problems, it also indicates that you can run The Checkstyle errors are the following:
I think |
@vsriram92 Thank you very much for making your first contribution to Spring Boot. |
To pass appropriate classloader as an argument to load factory names.
Consider a scenario where Spring-core is loaded from ${catalina.home}/lib and Spring-boot is loaded from project-specific WEB-INF/lib.
Without passing the classloader, SpringFactoriesLoader present in the Spring-Core is unable to find the loaded config classes such as ConfigTreeConfigDataLocationResolver and StandardConfigDataLocationResolver.
Due to which migration from 2.2.x from 2.4.x is causing UnsupportedConfigDataLocationException.
Unsupported config data location 'optional:file:./config/*/'
For more reference of the issue - https://stackoverflow.com/questions/67134959/spring-boot-unsupported-config-data-location-optionalfile-config