Issue
I try to enable Spring Boot Actuator (together with Swagger) and have in the pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.4.5</version>
</dependency>
with the following config in the yml
-file:
springdoc:
api-docs:
enabled: true
show:
actuator: true
management:
endpoints:
web:
exposure:
include= "*"
expose: "*"
When I launch it I get the following exception:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'management.endpoints.web.exposure' to org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties$Exposure:
Reason: No converter found capable of converting from type [java.lang.String] to type [org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties$Exposure]
Action:
Update your application's configuration
How to fix this Exception?
Solution
Your YAML has a = instead of a :
And remove expose:
Wrong:
management:
endpoints:
web:
exposure:
include= "*"
expose: "*"
Correct:
management:
endpoints:
web:
exposure:
include: "*"
Answered By - Simon Martinelli
Answer Checked By - Candace Johnson (JavaFixing Volunteer)