Spring Boot Actuator Not Working
It looks like IntelliJ has made a mess of the classpath. Looking at the jars supplied with -classpath
there's a lot of Spring Boot 1.0.2.RELEASE jars in there which doesn't match your pom.
The banner in the startup logs also shows that you're running Spring Boot 1.0.2.RELEASE:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.0.2.RELEASE)
Convincing IntelliJ to use the right classpath, or running your application on the command line with mvn spring-boot:run
should fix your problem, although I strongly suspect that you'll also need to add a dependency on spring-webmvc
:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
The simplest answer is, rather than point the request to
http://127.0.0.1:8081/health
Point to
http://127.0.0.1:8081/actuator/health
As you want to get the health status via HTTP, you may want to add this dependency and have a try:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>