Closed snicoll closed 1 year ago
Spring Native is now superseded by Spring Boot 3 official native support, see the related reference documentation for more details.
As a consequence, I am closing this issue, and recommend trying your use case with latest Spring Boot 3 version. If you still experience the issue reported here, please open an issue directly on the related Spring project (Spring Framework, Data, Security, Boot, Cloud, etc.) with a reproducer.
Thanks for your contribution on the experimental Spring Native project, we hope you will enjoy the official native support introduced by Spring Boot 3.
As a follow-up of #1592, the current code failed because the factory implementation is a static inner class of the related class that it handles and the code generation needs to load it to determine its canonical name.
Here is an example of a factory entry we have to implement: https://github.com/spring-projects/spring-boot/blob/35efc23deb467d3d9382624d49fb6aab3333af09/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java#L212-L224
While the class itself is shielded from its parent, code generation can lead us to get the canonical name of it and this would as a result load the inner class.