-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Throw exception if spring.config.location uses classpath*: #21168
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
Comments
At first I thought it would be possible to switch to @vkochnev Is there any reason you can't use |
Actually my location expected to be |
SpringBoot version 2.3.0.M4
When trying to set
spring.cloud.bootstrap.location
(which is effectively mapped tospring.config.location
) to something likeclasspath*:/config/
discovered that it doesn't work becauseorg.springframework.boot.context.config.ConfigFileApplicationListener
internally callsorg.springframework.util.ResourceUtils#isUrl
with supplied location and when receives false prepends it withfile:
. As a result it ends up withfile:classpath*:/config/
in my case, which is obviously incorrect.I filed spring-projects/spring-framework#24979 considering it might be a bug in SpringFramework, but was directed that if pattern support is desirable here then
org.springframework.core.io.support.ResourcePatternUtils#isUrl
should be used instead.The text was updated successfully, but these errors were encountered: