Spring Boot Actuator 2.2.5 基本使用

  1. pom文件 ,添加 Actuator 依赖

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-actuator</artifactId>

</dependency>

2.application.properties 文件中添加以下配置

management.endpoints.web.exposure.include=*

management.server.port=8081

3.启动springboot项目,会看到如下输出,

4.访问actuator,很多可以访问的路径,这些都是可被健康检查的指标。http://localhost:8081/actuator

5.查看系统所有的定时任务:http://localhost:8081/actuator/scheduledtasks

相关推荐
来一杯龙舌兰6 小时前
【Sentinel】Springboot整合Sentinel、Socket进行熔断限流(生产级熔断限流)
spring boot·后端·sentinel·熔断限流
在等晚安么6 小时前
记录自己写项目的第三天,springbot+redis+rabbitma高并发项目
java·spring boot·redis·1024程序员节
Rocket MAN7 小时前
Spring Boot 缓存知识体系大纲
spring boot·spring
Knight_AL8 小时前
Spring Boot 实现 DOCX 转 PDF(基于 docx4j 的轻量级开源方案)
spring boot·pdf·开源
兜兜风d'8 小时前
基于 Spring Boot + RabbitMQ 实现应用通信
spring boot·rabbitmq·java-rabbitmq·1024程序员节
小范同学_8 小时前
Spring集成WebSocket
java·spring boot·websocket·spring·1024程序员节
不爱编程的小九九15 小时前
小九源码-springboot088-宾馆客房管理系统
java·开发语言·spring boot
抹香鲸之海16 小时前
Prometheus+Grafana实现Springboot服务监控
spring boot·grafana·prometheus
摇滚侠17 小时前
Spring Boot 3零基础教程,WEB 开发 内嵌服务器底层源码分析 笔记48
spring boot·笔记