Affects: \5.2.8.RELEASE
I use org.springframework.core.io.support.PathMatchingResourcePatternResolver
to find resources packaged inside a jar which are in a subdirectory.
When I do this in a normal Java application the resource that is found correctly looks like this:
URL [jar:file:/home/nbasjes/.m2/repository/org/acme/resourcelib/1.0-SNAPSHOT/resourcelib-1.0-SNAPSHOT.jar!/Content/world.txt]
yet when I run the exact same code in a Quarkus application it finds the file yet the returned resource does not have the subdirectory of the file.
URL [jar:file:/home/nbasjes/.m2/repository/org/acme/resourcelib/1.0-SNAPSHOT/resourcelib-1.0-SNAPSHOT.jar!/world.txt]
So the difference is that in the Quarkus setup the resource is not reported in the actual subdirectory it is really stored in. Thus: loading the resource will fail with a file not found.
I was able to create a very small reproduction of the problem. https://github.com/nielsbasjes/BugReport-SpringQuarkus-ResourceLoading
Note that this was reported as a bug in the library I have written: https://github.com/nielsbasjes/yauaa/issues/216
Comment From: nielsbasjes
I am unsure if this problem is a SpringFramework, a Quarkus or perhaps in the combination of the two. So I have submitted this problem to both projects: - https://github.com/quarkusio/quarkus/issues/10943 - https://github.com/spring-projects/spring-framework/issues/25465
Comment From: bclozel
Seeing your latest insights on the original issue, this seems to work in all cases except with quarkus:dev. I'm closing this issue for now since it seems to be related with a resource loading problem in quarkus - please reopen if you manage to reproduce this problem consistently with other deployments.