springboot常用注解汇总(springboot-actuator使用篇)

springboot监控使用配置介绍,以下示例基于springboot使用2.1.13.RELEASE版本,接下来我们就来聊聊关于springboot常用注解汇总?以下内容大家不妨参考一二希望能帮到您!

springboot常用注解汇总(springboot-actuator使用篇)

springboot常用注解汇总

springboot-actuator基础使用(一)

springboot监控使用配置介绍,以下示例基于springboot使用2.1.13.RELEASE版本。

1. springboot项目maven引入actuator配置

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>

2. application.properties配置

#允许开启监控端点 management.endpoints.enabled-by-default=true #放开http所有监控端点 management.endpoints.web.exposure.include=* #设置显示健康状态明细(有注册中心需要查看健康状态有用) management.endpoint.health.show-details=always

3. application.yml配置

management: endpoints: web: exposure: include: * enabled-by-default: true endpoint: health: show-details: always

4.启动项目访问url

http://localhost:8080/actuator

请求地址返回json数据,里面的每个地址都可以访问得到对应的应用信息

本文由博客群发一文多发等运营工具平台 OpenWrite 发布

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页