The Spring team has announced the beta release for Spring Native, which is a project that enables developers to compile Spring applications as native executables with GraalVM in order to provide a lightweight deployment option.
Native Spring applications can be deployed as a standalone executable and provide benefits like quick startup, instant peak performance, and lower memory consumption.
There are two main pillars in the team’s strategy for going native:
- Adapting Spring infrastructure for native without requiring changes to existing Spring Boot applications
- Close collaboration with the GraalVM team to keep the Java ecosystem as consistent as possible.
According to the team, use cases for Spring Native include deploying serverless applications with Spring Cloud Function, cheaply hosting Spring microservices, a good fit with Kubernetes platforms such as VMware Tanzure, and creating container images that package Spring applications and services.
The team added that work on Spring Native has been a large collaborative effort between Spring’s various projects, such as Spring Framework, Spring Boot, Spring Data, Spring Security, Spring Cloud, and Spring Initializer. In addition, since the scope for Spring Native goes beyond just Spring to the JVM ecosystem, the team has been working with the GraalVM team to improve native image compatibility and footprint.
“It is a great joy to collaborate with the Spring team on crafting the native JVM ecosystem: their deep technical knowledge, wrapped with sensitive touch for the community always leads to the best solutions” said Vojin Jovanovic, senior research manager at Oracle Labs and member of the GraalVM team. “The latest Spring Native release, and its numerous usages in the JVM ecosystem, pave the way for the wide adoption of native compilation.”
The Spring team will be providing support for Spring Native in a subset of the Spring ecosystem. The team recommends trying it out using supporting dependencies, and submitting bug reports or pull requests if an error is encountered.
Spring Native will have a new release for every patch release of Spring Boot 2.x minor versions. For example, Spring Native 0.9.0 will support Spring Boot 2.4.3 and Spring Native 0.9.1 will support Spring Boot 2.4.4, and so on.