Spring

Supercharge Spring Apps with Zero Effort: Automatic AOT Optimizations in Tanzu Platform

Tanzu Platform continues to raise the bar in simplifying cloud-native app deployments with its latest update, enhancing performance and introducing new capabilities for developers using the Java buildpack. The most recent improvements, which were released in February, provide automatic optimization capabilities and seamless integrations with Tanzu Buildpacks. These changes will deliver smoother developer workflows and more efficient Java applications running on the platform.

Java Buildpack Efficiency Enhancements

Java developers are often tasked with optimizing the performance of their apps on cloud platforms, and Tanzu Platform Java buildpack is now even easier. With the latest version of the buildpack, efficiency improvements like CDS (Class Data Sharing) or Spring AOT optimizations are applied automatically when the related flags are enabled during the app deployment process. For an increasing number of use cases, no application-level configuration changes are required. This means fewer manual tuning and configuration steps for developers, allowing them to focus more on writing code rather than managing infrastructure.

In practice, developers or operators can enable those optimizations by just defining JBP_SPRING_BOOT_EFFICIENCY: '{ "aot_enabled": true, "cds_enabled": true }' in their manifest.yml file. You can find more details in the release notes.

These automatic performance enhancements include:

  • Memory Optimization: CDS and Spring AOT automatic optimizations reduce the memory consumption measured after startup by up to 20%, giving more heap memory for better performances.
  • Optimized Startup Times: CDS and Spring AOT allow Spring applications to start up to 2x faster, enabling Java apps to be deployed on smaller instances with lower cost.

These improvements are designed to give applications running on Tanzu Platform an extra performance boost while keeping things simple for developers. The platform aims to provide applications that deliver optimal performance immediately upon deployment, eliminating the need for extensive infrastructure expertise or performance optimization.

Introducing Platform level optimization of Spring Boot applications

The game-changing innovation implemented in Tanzu Buildpacks is that those Spring optimizations are computed on Tanzu Platform with the knowledge of the target environment configuration instead of on the developer’s laptop, allowing reduced side effects that usually come with those optimizations and may require advanced configuration customization when using just OSS technologies.

Tanzu Buildpacks can take as input an unoptimized Spring Boot executable JAR (typically deployed with `cf push`) and apply those optimizations automatically to create an optimized executable JAR transparently, which is then deployed on the platform.

When Tanzu Buildpacks supports Java 25 (the next LTS expected to be released in September 2025), it should be able to automatically leverage JVM AOT Cache (the CDS successor), bringing even more benefits.

Combined with Tanzu Spring, which provides top-tier support for Spring, Apache Tomcat®, and Java OpenJDK™, along with exclusive enterprise-ready features, components, and extensions, those Tanzu Buildpacks features bring your Spring-based applications to the next level.

With these improvements, Tanzu Platform is solidifying its position as a leading platform for cloud-native application development, offering a powerful and efficient environment for Java developers to build, deploy, and scale their applications with confidence.Accelerate your Spring applications today with zero configuration changes. Deploy your next Java app on Tanzu Platform to unlock automatic performance optimizations that reduce memory usage by up to 20% and double startup speeds—all without changing a line of code. Experience the difference of platform-level optimization by upgrading to the latest Java buildpack now and focus on innovation, not infrastructure tuning.