context-path
1 | # 旧版 |
Actuator
Dependency
1 | <dependency> |
Endpoints
执行器端点(endpoints)可用于监控应用及与应用进行交互
- env 显示来自Spring的 ConfigurableEnvironment的属性
- health 显示应用的健康信息
- info 显示任意的应用信息
- metrics 展示当前应用的metrics信息
- mappings 显示一个所有@RequestMapping路径的集合列表
- logfile 返回日志文件内容(如果设置了logging.file或logging.path属性的话)
- prometheus 以可以被Prometheus服务器抓取的格式显示metrics信息
启用禁用:
1 | management.endpoint.metrics.enabled=true |
隐藏暴露:
1 | management.endpoints.web.exposure.include=metrics |