Closed thejames97 closed 2 years ago
Thanks for the reproducer. Spring Native is fairly limited in what it does there and is based on the components indexer (that main component scan directive). We're taking this code over and we'll look at honoring @EntityScan
so that the sample works as expected.
When running as native image the framework throws "Not a managed type" exception on my Entity when my Entity class is not in the same package hierarchy as the application class, even though I've specified the package where the Entity is in the @EntityScan annotation. The app starts up and works fine in JVM mode. It also starts up and works fine in the native image when I move the Entity class to a sub-package of the application class. But this is not always possible (or even desirable).
Reproducer app: https://github.com/thejames97/spring-native-bug