Enable Spring Boot Actuator

This feature is available since Bloomreach Experience Manager 14.6.0



Enable Spring Boot Actuator in an implementation project's CMS application in order to access additional monitoring and management features.


Since version 14.6, Spring Boot framework has been integrated into the CMS application, adding support for a number of additional features to help in monitoring and managing the CMS application when it is pushed to production. The CMS application can be managed and monitored through HTTP endpoints or JMX by leveraging Spring Boot Actuator.

This page explains how to enable Spring Boot Actuator in the CMS application.


To use this feature, your implementation project must use Bloomreach Experience Manager version 14.6.0 or later.


Add Maven dependencies

Open cms-dependencies/pom.xml and add the following dependencies:


Please note that spring-boot-starter-logging and slf4j-api dependencies should be excluded.

The dependencies above add support for Spring Boot Actuator and the Micrometer framework.

Create Spring Boot configuration

In the CMS module, create a new file src/main/java/org/bloomreach/xm/cms/ActuatorConfiguration.java with the following contents:

package org.bloomreach.xm.cms;

import javax.naming.NamingException;
import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.jndi.JndiObjectFactoryBean;

@PropertySource(value = "classpath:actuator.properties")
public class ActuatorConfiguration {

    String datasourceName;

    @Bean(destroyMethod = "")
    DataSource jndiDataSource() throws IllegalArgumentException, NamingException {
        final JndiObjectFactoryBean bean = new JndiObjectFactoryBean();
        bean.setJndiName("java:comp/env/jdbc/" + datasourceName);
        return (DataSource) bean.getObject();

    HealthIndicator dbHealthIndicator(final DataSource dataSource) {
        return new DataSourceHealthIndicator(dataSource, "SELECT 1");

@PropertySource(value = "classpath:actuator.properties") points to the property file which contains additional configuration.
Any Java-based configuration located at org.bloomreach.xm.cms will be auto located and used by Spring Boot due to framework conventions.

Create properties File

Create a new file src/main/resources/actuator.properties with the following contents:



The sample configuration above enables health probes and exposes all actuator's endpoints. For further information please refer to Spring Boot Actuator documentation.

Create a datasource if not present

Please note that app.datasource.name property should point to a JNDI datasource name used in your CMS setup, typically a <Resource> element in context.xml.
When running on Bloomreach Cloud, please reuse the repository datasource named "repositoryDS".

For running locally with Cargo, it's easiest to use an H2 database.

<Resource name="jdbc/actuatorDS" auth="Container" type="javax.sql.DataSource"
     maxTotal="100" maxIdle="10" initialSize="10" maxWaitMillis="10000"
     testWhileIdle="true" testOnBorrow="false" validationQuery="SELECT 1"
     username="sa" password=""

Rebuild and start the project using cargo profile

Rebuild and start the project.

Access http://localhost:8080/cms/actuator. You should see Spring Boot Actuator based page.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?