Actuator endpoints let you monitor and interact with your application. Spring Boot includes a number of built-in endpoints and lets you add your own. For example, the health endpoint provides basic application health information.
Actuator Depandancy :-
Maven -
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> </dependencies>
Gradle -
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
}
Access actuator - http//localhost:8080/actuator/health
8080 - is a port number it could be anything.
By default only health and info are accessible for security reasons in web based application. if you want to access all the endpoints.
management.endpoints.web.exposure.include=*
in case only selected endoints -
management.endpoints.web.exposure.include= health, info, env
for exclude endpoints in case of * selection
management.endpoints.web.exposure.exclude=env,beans
More details click here -
Tags:
Dev