Introduce native applications guidelines for Spring contributors
proxyBeanMethods=falseon configurations to avoid CGLIB proxies- Favor using functional constructs rather than reflection: method references and lamdas when possible instead of reflection like in Spring Boot
LoggingSystem. - Build time initialization + static initialization when optional libraries are used to allow automatic build time code removal
- Move reflection from runtime to build-time
- etc.
Might I suggest a note that the UID and GID running the application are different after building container as native compared to non native container. Not relevant in many cases but took me some time to figure that one out when needed.
I also noted that kotlin data classes seems to fail if they are used as DTOs and have not a default set for all var in the constructor also same kind of issue if java classes are using lombok (com.fasterxml.jackson.databind.exc.InvalidDefinitionException). Also some errors I haven't noted with @Entity/@Document classes combined with lombok. Not sure if these are because of bad configuration on my side but thought I mentioned it.
@ekcasey Could you please comment on the UID/GID point raised above?
@grekier The Kotlin reflection issue should be fixed via KT-44594, see #419 related issue.
TODO: mention it is possible to debug spring-aot-maven-plugin with mvnDebug.