首页  

springboot2 actuator 使用     所属分类 spring 浏览量 1171
org.springframework.boot:spring-boot-starter-parent
2.0.9.RELEASE

引入依赖
org.springframework.boot:spring-boot-starter-actuator

配置文件增加

# 开启所有端点
management.endpoints.web.exposure.include=*
#management.endpoints.web.exposure.exclude=env


/actuator  显示所有可用的监控端点


SpringBoot2.0 端点基础路径由 / 调整到 /actuator  如 /info变为 /actuator/info 
基础路径可配置
management.endpoints.web.base-path=/



shutdown 默认不启用
management.endpoint.shutdown.enabled=true


conditions	显示配置类和自动配置类(configuration and auto-configuration classes)的状态及它们被应用或未被应用的原因
beans	 所有Spring Beans 列表

heapdump	返回GZip压缩的hprof堆dump文件
httptrace
 
mappings  所有 @RequestMapping 列表

env 包含以下信息
activeProfiles
propertySources 
    servletContextInitParams
    systemProperties
    systemEnvironment
    applicationConfig  classpath:/application.properties
    配置项列表
    
能显示 applicationConfig 配置文件全路径就更完美了

上一篇     下一篇
ConcurrentHashMap在jdk7和8中的区别

优秀投资者的十大特征

springboot web端口设置三种方式

springboot2获取web端口

springboot2微服务实例

springcloud DiscoveryClient使用说明