Upravit

Sdílet prostřednictvím


Turn on Java features in Azure Container Apps

This guide provides step-by-step instructions for enabling key Java features in Azure Container Apps. By activating these features, you can optimize your Java applications for performance, monitoring, and ease of development.

Java virtual machine (JVM) metrics

Java virtual machine (JVM) metrics are essential for tracking the performance and health of your Java applications. These metrics offer insights into memory consumption, garbage collection, and thread activity within the JVM. By enabling Java metrics in Azure Container Apps, you can access these detailed metrics in Azure Monitor to proactively optimize application performance and address potential issues.

To turn on Java virtual machine (JVM) metrics in the portal, refer to Java metrics for Java apps in Azure Container Apps.

To turn on Java virtual machine (JVM) metrics on CLI, refer to Java metrics for Java apps in Azure Container Apps.

Automatic memory fitting

By default, the JVM manages memory conservatively, but Java automatic memory fitting fine-tunes how memory is managed for your Java application. Automatic memory fitting makes more memory available to your Java app, which may potentially boost performance by 10-20% without requiring code changes.

Automatic memory fitting is enabled by default, but you can disable manually.

Disabling automatic memory fitting is currently only available on CLI, please refer to Disable memory fitting.

To turn off automatic memory fitting on CLI, refer to Disable memory fitting.

Diagnostics

Azure Container Apps provides a built-in diagnostics tool designed specifically for Java developers, which makes debugging and troubleshooting easier and more efficient.

Dynamic logger level

Enabling dynamic logger level is currently only available on CLI, refer to Enable JVM diagnostics for your Java applications for details.

To turn on dynamic logger level on CLI, refer to Enable JVM diagnostics for your Java applications for details.

Java components

Azure Container Apps supports Java components as managed services, which allows you to extend the capability of your applications without having to deploy additional code.

Eureka Server for Spring

Eureka Server for Spring is a service registry that allows microservices to register themselves and discover other services. Available as an Azure Container Apps component, you can bind your container app to a Eureka Server for Spring for automatic registration with the Eureka server.

To use Eureka Server for Spring on portal, refer to Create the Eureka Server for Spring Java component on Portal.

To use Eureka Server for Spring on CLI, refer to Create the Eureka Server for Spring Java component on CLI.

Config Server for Spring

Config Server for Spring provides a centralized location to make configuration data available to multiple applications.

To use Config Server for Spring on portal, refer to Create the Config Server for Spring Java component on Portal.

To use Config Server for Spring on CLI, refer to Create the Config Server for Spring Java component on CLI.

Admin for Spring

The Admin for Spring managed component offers an administrative interface for Spring Boot web applications that expose actuator endpoints.

To use Admin for Spring on portal, refer to Use the component on Portal.

To use Admin for Spring on CLI, refer to Use the component on CLI.

Tip

With Eureka Server for Spring, you can bind Admin for Spring to Eureka Server for Spring, so that it can get application information through Eureka, instead of having to bind individual applications to Admin for Spring. For more information, see Integrate Admin for Spring with Eureka Server for Spring in Azure Container Apps.

Next steps