在1.5.x版本中通过management.security.enabled=false,关闭安全服务来暴露所有端点,但是在版本更新中弃用了,在新版本中,用新的方式来暴露端点
方式一properties文件:
management.endpoints.web.exposure.include=*
方式二yml文件:
management:
endpoints:
web:
exposure:
include: '*'
默认只开启了2个端点
全部暴露出来有13个端点
在访问时候,以前的版本是:
http://localhost:8080/beans
但是现在需要加上前缀
http://localhost:8080/actuator/beans
而且很多端点名都发生了变化,不清楚的可以输入
http://localhost:8080/actuator
来查看所有端点