简体   繁体   中英

How to disable the Spring Boot 2 Actuator discovery page

As explained in the Spring Boot 2.0 Actuator docs , Spring automatically generates a discovery page at the configured Actuator base path.

However, I have my own overview page mapped at that same base path. Because the Actuator endpoint mappings have a higher priority than my own mappings, I cannot override the mapping.

Is there a way to disable the generation of this discovery page by Spring Boot?

The documentation only mentions that the page is disabled when setting the management context path to '/', but that's not an option for me (this would require a lot of endpoint remappings).

You could update the management.context-path to some other path. Something like this

management.context-path=/someOtherActuatorPath

Your discovery page would now be on /someOtherActuatorPath

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM