springboot2.0版本默认不会将所有断点暴露,需要以下配置:
#actuator端口
management.server.port=8310
#修改访问路径,2.0之前默认是/,2.0默认是/actuator
management.endpoints.web.base-path=/actuator
#开放所有页面节点 ,默认只开启了health、info两个节点
management.endpoints.web.exposure.include=*
#显示健康具体信息,默认不会显示详细信息
management.endpoint.health.show-details=always
配置后日志信息如下:
Exposing 14 endpoint(s) beneath base path '/actuator'
Mapped "{[/actuator/auditevents],methods=[GET]
Mapped "{[/actuator/beans],methods=[GET]
Mapped "{[/actuator/health],methods=[GET]
Mapped "{[/actuator/conditions],methods=[GET]
Mapped "{[/actuator/configprops],methods=[GET]
Mapped "{[/actuator/env],methods=[GET]
Mapped "{[/actuator/env/{toMatch}],methods=[GET]
Mapped "{[/actuator/info],methods=[GET]
Mapped "{[/actuator/loggers],methods=[GET]
Mapped "