Problem
Spring Boot Actuator properties such as management.endpoints.enabled-by-default, management.endpoint.health.show-details, or management.endpoints.web.exposure.include are marked as unrecognized in application.properties or application.yml.
Example properties that may show warnings:
management.endpoints.enabled-by-default=false
management.endpoint.health.show-details=always
management.endpoint.info.enabled=true
management.endpoints.web.exposure.include=*
Cause
The management.* properties are provided by the Spring Boot Actuator module. IntelliJ IDEA resolves property keys from the classpath — if the spring-boot-starter-actuator dependency is not included in the project, the IDE cannot recognize these properties.
Resolution
Add the spring-boot-starter-actuator dependency to the project.
Maven — add to pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Gradle (Groovy) — add to build.gradle:
dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
}
Gradle (Kotlin) — add to build.gradle.kts:
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
}
After adding the dependency, reload the project (File | Invalidate Caches is not required — a simple Maven or Gradle reload is sufficient). The management.* properties will then be recognized.
Comments
0 comments
Please sign in to leave a comment.