28506 introduced JPMS support in PathMatchingResourcePatternResolver by using ModuleFinder.ofSystem(), but it has introduced a significant footprint increase on native (close to 2M RSS) due to the transitive usage of JarVerifier and related crypto classes.

This commit skip ModuleFinder.ofSystem() usage on native since JPMS usage is pretty niche, so it is probably ok to skip it on native. We may be able to re-introduce JPMS on native support there if we achieve to support this use case via #29081.

Comment From: sbrannen

While working on #29163, I have encountered the following error.

    => com.oracle.svm.core.jdk.UnsupportedFeatureError: JRT file system is disabled
       com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
       jdk.internal.module.SystemModuleFinders$SystemImage.reader(SystemModuleFinders.java:139)
       jdk.internal.module.SystemModuleFinders$ModuleContentSpliterator.<init>(SystemModuleFinders.java:527)
       jdk.internal.module.SystemModuleFinders$SystemModuleReader.list(SystemModuleFinders.java:502)
       org.springframework.core.io.support.PathMatchingResourcePatternResolver.lambda$findAllModulePathResources$6(PathMatchingResourcePatternResolver.java:819)

In light of that, I am reopening this issue and co-assigning it to me since I'll work on a fix.