I'm developing a Spring based application that consists of several microservices. One of my microservices acts as a Eureka server and everything works fine so far.
In all my other microservices (which are annotated with @EnableEurekaClient), I want to enable health checks like this:
application.yml
eureka:
client:
healthcheck:
enabled: true
The first thing I notice, is that my IDE shows me an error:
Cannot resolve configuration property 'eureka.client.healthcheck.enabled'
This happens in both, Intellij Idea and STS, so I assume it's not just an IDE bug!
The start of the application fails with a long UnsatisfiedDependencyException where the root cause is the following:
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.health.OrderedHealthAggregator at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_151] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_151] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_151] ... 87 common frames omitted
If I add compile('org.springframework.boot:spring-boot-starter-actuator') to my build.gradle file (I assume, this is what the error message wants to tell me), it compiles and starts fine. However, the IDE is still showing me the error above.
My questions are the following:
1. Is it the intended behaviour that actuator needs to be on the classpath if one wants to use Eureka health checks?
2. Why am I getting the error message from my IDE?
Thanks for help!