mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
29f085bd1a
When a hint such as `graphql/*.*` is registered for resources that are looked up via classpath scanning using a pattern such as `classpath*:graphql/**/*.graphqls`, an appropriate pattern is in fact registered in the generated `resource-config.json` file for GraalVM native images; however, classpath scanning fails since GraalVM currently does not make the `graphql` directory automatically available as a classpath resource. This can be very confusing and cumbersome for users since a file such as `graphql/schema.graphqls` will not be discovered via classpath scanning even though the file is present in the native image filesystem. To address this, this commit automatically registers resource hints for enclosing directories for a registered pattern. If the GraalVM team later decides to perform automatic directory registration, we can then remove the code introduced in conjunction with this issue. Closes gh-29403