The GraalVM system apparently cannot compile a Spring application into a native image.
Can we compile a subset of the Spring application -- say, as a separate librar
For now one can use alternatives like Quarkus, Micronaut and Vert.X which have Spring-compatible features. They are all compilable to small native-code binary executables, start up in an instant and have tiny memory footprints.
These new frameworks avoid GraalVM's limitations by interpreting the annotations and other specifications at build time. This way they avoid the run-time features of Java that the GraalVM AOT compiler native-image cannot support.