八、Spring Boot与监控管理
一、监控管理
通过引入spring-boot-starter-actuator,可以使用Spring Boot为我们提供的准 生产环境下的应用监控和管理功能。我们可以通过HTTP,JMX,SSH协议来进 行操作,自动得到审计、健康及指标信息等
- 步骤:
– 引入spring-boot-starter-actuator
– 通过http方式访问监控端点
– 可进行shutdown(POST 提交,此端点默认关闭) 
pom.xml
1  | <?xml version="1.0" encoding="UTF-8"?>  | 
application.properties
1  | management.security.enabled=false  | 
git.properties
1  | git.branch=master  | 
Springboot08ActuatorApplication.java
1  | package com.atguigu.springboot08actuator;  | 
MyAppHealthIndicator.java
1  | package com.atguigu.springboot08actuator.health;  | 
- 本文作者: 生活,生活?
 - 本文链接: ayjcsgm.github.io/2019/11/08/8、Spring-Boot笔记整理高级篇-监控/
 - 版权声明: 本博客所有文章除特别声明外,均采用 Apache License 2.0 许可协议。转载请注明出处!
 
		
