-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Fat jar has two candidate URLs for classpath*:**/
patterns, leading to resources duplication
#7449
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
classpath*:**/
type of URLclasspath*:**/
patterns, leading to resources duplication
@wilkinsona will be interested in this one. I hope we don't need to add filtering back to the system classloader. |
I tried spring boot 1.4.3 and spring 4.3.5 snapshot version, however this issue and SPR-14934 does not resolved in my repro project. In my repro project is https://github.com/kazuki43zoo/repro-PathMatchingResourcePatternResolver.
It has been detected same resource twice from relative path and absolute path. |
@kazuki43zoo I am not sure the framework fix has been backported yet. @jhoeller any idea here? |
@snicoll Oh... I will confirm it. |
@snicoll @wilkinsona , thanks for quick replying !! I will try again after backporting to Spring 4.3.x line. |
Hi @snicoll @wilkinsona @jhoeller, I've tried latest snapshot version. This issue has been resolved !! |
@kazuki43zoo Thanks for the confirmation |
This is a follow-up of SPR-14934.
Assume we need to collect the resources matching the
classpath*:/**/*.xml
pattern in a Spring Boot application. As of 1.4, two root urls will be used for the search:The former is the one used by the
LaunchedUrlClassLoader
and the latter is used by the system classloader. Because we asked to search "everything", the system classloader finds the resource again, leading to a duplication. Arguably, the system classloader must ignore anything inBOOT-INF
since it is managed by theLaunchedUrlClassLoader
already.The text was updated successfully, but these errors were encountered: