My actuators in spring boot are not working

My actuators in spring boot are not working



I am trying to check whether my spring boot application is up and running via spring boot actuators. My spring boot application annotation contains this:


@SpringBootApplication(exclude =
DataSourceAutoConfiguration.class,
WebMvcAutoConfiguration.class,
HibernateJpaAutoConfiguration.class EntityManagerFactory
)



In my application properties file I have management.server.port=8081. But when I start up my application and try to run localhost:8081/actuator/info I got an error - This site can not be reached.


management.server.port=8081


localhost:8081/actuator/info



What am I doing wrong ?



Thank you for any help.






Which version of Spring boot are you using?

– karen
Sep 18 '18 at 11:22






My spring boot version is 2.0.1.RELEASE.

– User5468622
Sep 18 '18 at 11:25






In your pom.xml you have to import the dependency spring-boot-starter-actuator. Did you have it?

– riccardo.cardin
Sep 18 '18 at 11:26


pom.xml


spring-boot-starter-actuator






Yes, I am using gradle - compile("org.springframework.boot:spring-boot-starter-actuator").

– User5468622
Sep 18 '18 at 11:27







If you have server.servlet.context-path configured in your application.properties, then your actuator will be available on localhost:8081context-path/actuator. Also, it should be "actuator" not "actuators"

– sechanakira
Sep 18 '18 at 11:28




0



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)