Spring Boot Actuator
September 10, 2021

M04 Q26 What are the actuator endpoints that are provided out of the box?

You can enable or disable Actuator Endpoints with usage of property:

management.endpoint.${ENDPOINT_NAME}.enabled=true

For example:

management.endpoint.shutdown.enabled=true
management.endpoint.beans.enabled=false
management.endpoint.info.enabled=false

You can also disable ‘Enabled by default’ behavior with usage of property:

management.endpoints.enabled-by-default=false

You can change endpoints exposure with usage of properties:

management.endpoints.jmx.exposure.exclude
management.endpoints.jmx.exposure.include
management.endpoints.web.exposure.exclude
management.endpoints.web.exposure.include

For example:

management.endpoints.web.exposure.include=info, health, env, beans

You can also expose all endpoints with usage of wildcard, for example:

management.endpoints.web.exposure.include=*

You can enable navigation through Actuator Endpoints, by usage of HATEOAS

To enable this navigation, all you have to do is to add dependency to your project:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>

After having this dependency, visiting main Actuator page:

http://localhost:8080/actuator

Will give you _links element in response, that can be used for navigation.