选中ops下Actuator的模块,和web模块作为测试用。
org.springframework.boot
spring-boot-starter-parent
1.5.12.RELEASE
这里注意需要使用低版本springboot,高版本需要修改一些配置。
定制端点
举例:
改变beans的id endpoints.beans.id=mybean
改变之后就变成localhost:8080/mybean访问,原来的localhost:8080/beans访问不到了
如果再接着配置endpoints.beans.path=/bean
则访问路径就变为localhost:8080/bean