Like it was done for Spring Native, it would significantly improve the native DevXP if Spring Boot was adding resource hints for all resources in the application src/main/resources and src/test/resources. This would be complementary of the resource hints added for currently supported Spring features (templates for example).
2 use cases where that can be useful:
- User provided custom resources like Petclinic db directory is a very popular use case.
- logback.xml is currently not supported (see #25847 for more context) but currently it is silently ignored because logback*.xml files are not shipped in the native image. With that feature implemented, users would have the expected error when the file will be parsed on native, making them aware this is not supported yet.
In term of implementation, at Maven/Gradle plugin level, Spring Boot could list the resources files in src/main/resources and src/test/resources and register related hints.
Comment From: wilkinsona
We've discussed this today and agreed that we don't want to automatically add hints for all of an application's resources. If we add all resources, we'd never be able to make things more focussed without breaking someone. We could also add too much as Petclinic's db directory shows – it contains scripts for 4 different databases but a native image will only ever use one. We'd prefer a more focussed approach on an as-needed basis.