spring-boot-starter-actuator监控端点问题
在研究spring cloud config动态刷新配置的时候,需要用到spring-boot-starter-actuator监控模块,actuator使用的是2.0.6版本。项目启动后发现只有/health
和/info
端点,无法使用/refresh
端点。
查阅官网后发现需要增加配置来暴露:
把/refresh
端点暴露出来后,就可以通过POST 调/actuator/refresh
来更新配置了。
actuator监控模块2.0后默认只开启/health
和/info
监控端点,其它端点需要通过配置参数来暴露。
比如想使用spring cloud bus来实时更新总线上的属性配置,需要开通/bus-refresh
端点: