Closed mraible closed 1 year ago
We should agree on a first configuration to get Native image compilation up and running otherwise it will be to cumbersome try to get native hints for all configurations right.
So maybe (monolith) SQL + jwt and oauth?
@mraible Can you create an example repo? I can start checking what needs to be done. Regarding modernizer and arch unit things I guess they are working on the ahead of time compiled class files, which seem to violate some package constraints and using auto(un)oxing or so. Maybe we can just exclude them when aot is in place.
FYI, 3 weeks ago, Josh Long sucessfully natively compiled these 3 projects https://github.com/spring-projects/spring-authorization-server/tree/main/samples/ No H2 in there, which seems to be blocking here.
@atomfrede I created a blog-oauth2-native project and added a pull request with the changes necessary to get things compiled with GraalVM.
Overview of the feature request
Now that we're using Spring Boot 3, it should be possible to compile to a native image. Unfortunately, we don't inherit from
spring-boot-starter-parent
, so I had to copy itsnative
andnativeTest
profiles into mypom.xml
. I also added the following to build > plugins:When I try to build with
mvn -Pnative native:compile
, I get all kinds of errors from the modernizer plugin:If I remove the modernizer plugin, the
TechnicalStructureTest
test fails:If I skip tests with
mvn -Pnative native:compile -DskipTests
, it compiles successfully.However, it does not start successfully:
If I remove all the
jhipster.*
properties fromapplication-dev.yml
, I get a bit further, but it still doesn't start.Motivation for or Use Case
We should support GraalVM Native Images by default.
JDL used