PathMatchingResourcePatternResolver fails to resolve resources from JAR located in path with '#' on JDK 11+ #26104
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Affects: Spring Framework 5.3.1 on JRE 11+
I have a simple JAR which contains the resource
demo/dummy.txt
and a class with this code:If I put this JAR into
c:\tmp\demo
and run the code, the resource is found.If I put this JAR into
c:\tmp\#demo
and run the code, no resources are found. Instead, an exception is logged at debug level:This is only reproducible with JRE 11 and newer. Both cases work as expected if I run them with JRE 8.
See also this demo project: https://github.com/rweisleder/resource-resolver-demo
The text was updated successfully, but these errors were encountered: