13.4 Micronaut for GraalVM

GraalVM is a new universal virtual machine from Oracle that supports a polyglot runtime environment and the ability to compile Java applications down to native machine code.

Any Micronaut application can be run using the GraalVM JVM, however special support has been added to Micronaut to support running Micronaut applications using GraalVM’s native-image tool.

Micronaut currently supports GraalVM 21.0.0 version and the team is improving the support in every new release. Don’t hesitate to report issues however if you find any problem.

A lot of Micronaut’s modules and third party libraries have been verified to work with GraalVM: HTTP server, HTTP client, Function support, Micronaut Data JDBC and JPA, Service Discovery, RabbitMQ, Views, Security, Zipkin,…​ Support for other modules is still evolving and will improve over time.

Getting Started

Use of GraalVM’s native-image tool is only supported in Java or Kotlin projects. Groovy relies heavily on reflection which is only partially supported by GraalVM.

To start using GraalVM you should first install the GraalVM SDK via the Getting Started or using Sdkman!.