Search code examples
spring-bootprobereadinessprobelivenessprobe

"Cannot resolve configuration property" in Spring boot when trying to configure probes


In my Spring Boot 2.3.3.RELEASE I'm tyring to enable to readiness and liveness endpoints.

I added this to the yml file:

enter image description here

But IntelliJ marks the values with "Cannot resolve configuration property" , and the endpoints are not accessible (e.g. http://localhost:8080/actuator/health/readiness)


Solution

  • The project was missing the trivial dependency of the actuator:

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

    After adding it, the IntelliJ stopped complaining and the endpoints are accessible.