Using deprecated values (aot_enabled & cds_enabled) will not enable spring app optimization in Tanzu HUB
search cancel

Using deprecated values (aot_enabled & cds_enabled) will not enable spring app optimization in Tanzu HUB

book

Article ID: 429321

calendar_today

Updated On:

Products

VMware Tanzu Platform - Hub

Issue/Introduction

You attempted to enable spring app optimization for an application using the following command and restaged the app.

$ cf set-env APP_NAME JBP_CONFIG_SPRING_BOOT_EFFICIENCY '{ aot_enabled: true, "cds_enabled": true }'

Post the app start, you confirmed both values were set correctly by checking the env setting via either CF CLI or apps manager.

However, the app is still being displayed when you set the filter to "Spring App Optimization: Not Enabled" in the Tanzu Hub UI.

 

Resolution

Both aot_enabled and cds_enabled have been deprecated so setting the app env with these two values will not make the Tanzu Hub recognize the app as "spring app optimization: enabled".

The configuration variable names used for the Spring Boot optimization feature have changed to align with the direction of the supporting features in the JVM in future releases.

The new variable names are as follows:

  • spring_aot_enabled: true’ - to have the buildpack perform AOT optimizations on the app (formerly ‘aot_enabled’, now deprecated)
  • aot_cache_enabled: true’ - to have the buildpack create an AOT cache file for the application (formerly ‘cds_enabled’, now deprecated)

So now you need to run a command similar to the following to enable the spring app optimization for an app and then restage it. Then you would be able to see the app being recognized as a "spring app optimization: enabled" app in the Tanzu Hub UI.

$ cf set-env APP_NAME JBP_CONFIG_SPRING_BOOT_EFFICIENCY '{ aot_cache_enabled: true, spring_aot_enabled: true }'