Skip to content
Graal feature for building native images of Spring applications
Java Shell HTML CSS Other
Branch: master
Clone or download


This project contains code to enable the building of native images with GraalVM.

Once built, native images have very fast startup!

This feature supports:

  • Graal
  • Spring Boot 2.2.0

To try it out, install Graal from:, then install native-image by running gu install native-image (currently it is available as an early adopter plugin).

Then build the feature project with:

cd spring-graal-native-feature
./mvnw clean package

Now go into the spring-graal-native-samples subfolder from the root of the project. Each folder in there is using a piece of Spring technology. Within each is a mini project and a script - the script will call the native-image command passing the feature on the classpath, the executable produced in each case should start instantly.

You can try the feature with your own projects, see the sample projects for typical usage or the commandlinerunner-maven sample for how to add native-image packaging to your pom.xml.


Q. I get out of memory problems?

A. native-image likes to use a lot of RAM. There have been problems observed at 8G.

Q. This just isn't working for my project! Why not?

A. As samples are added, new technologies/libraries are supported. Initially support might be hard coded for that sample but the intention is always to generalize that support so any project using 'that tech' will work. So, if not working for your project it may be because you are using a library that hasn't been tested yet (no sample) or we haven't yet generalized the support for that library to work for any project consuming it. Feel free to let us know and we can explore what's up.

Q. Are you taking contributions?

A. Sure, but please recognize this is an experimental project, we aren't at the polishing javadoc stage right now :)

You can’t perform that action at this time.