Upgraded java version to 17, spring boot version to 2.5.7 when running testcases for actuator/info geting 404. How to resolve?
how to resolve tried
management:
endpoints:
jmx:
exposure:
include: "health,info"
web:
exposure:
include: "
management: endpoints: jmx: exposure: include: "health,info" web: exposure: include: "
Solution 1:
in case you'd like to expose only /actuator/info
management:
endpoints:
web:
exposure:
include: info
(you expose specific endpoints by adding comma separated values like:info,health,metrics,mappings,prometheus
)
dont forget to add spring boot actuator starters
build.gradle
:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
...
}
or pom.xml
:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
(note - version not specified)