今天跟大家分享Spring Boot之程序性能监控的知识。1 Spring Boot之程序性能监控Spring Boot特别适合团队构建各种可快速迭代的微服务,同时为了减少程序本身监控系统的开发量,Spring Boot提供了actuator模块,可以很方便的对你的Spring Boot程序做监控。1. actuator接口说明Spring Boot应用中加入监控很简单,只需要在pom.xml文件中加入以下依赖:dependency> groupId>org.springframework.bootgroupId> artifactId>spring-boot-starter-actuatorartifactId>dependency>为了保证actuator接口的敏感性,在配置文件中,开放安全属性配置:management.security.enabled=false这样就能允许你查看Spring Boot进程的actuator信息了。启动Spring Boot程序,在启动日志里看到可访问的actuator接口:通过这些,我们可以实时的获取应用的各项监控指标。
………………………………