`
zysnba
  • 浏览: 188418 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Spring Boot监控与管理的实现

 
阅读更多
1,引入
<dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>   

2application.properties属性配置文件,添加如下配置:

#开放所有的web Endpoints
management.endpoints.web.exposure.include= *
3访问:http://localhost:8081/actuator
所有端点详细信息如下:
// http://localhost:8081/actuator

{
  "_links": {
    "self": {
      "href": "http://localhost:8081/actuator",
      "templated": false
    },
    "auditevents": {
      "href": "http://localhost:8081/actuator/auditevents",
      "templated": false
    },
    "beans": {
      "href": "http://localhost:8081/actuator/beans",
      "templated": false
    },
    "caches-cache": {
      "href": "http://localhost:8081/actuator/caches/{cache}",
      "templated": true
    },
    "caches": {
      "href": "http://localhost:8081/actuator/caches",
      "templated": false
    },
    "health-component-instance": {
      "href": "http://localhost:8081/actuator/health/{component}/{instance}",
      "templated": true
    },
    "health-component": {
      "href": "http://localhost:8081/actuator/health/{component}",
      "templated": true
    },
    "health": {
      "href": "http://localhost:8081/actuator/health",
      "templated": false
    },
    "conditions": {
      "href": "http://localhost:8081/actuator/conditions",
      "templated": false
    },
    "configprops": {
      "href": "http://localhost:8081/actuator/configprops",
      "templated": false
    },
    "env": {
      "href": "http://localhost:8081/actuator/env",
      "templated": false
    },
    "env-toMatch": {
      "href": "http://localhost:8081/actuator/env/{toMatch}",
      "templated": true
    },
    "info": {
      "href": "http://localhost:8081/actuator/info",
      "templated": false
    },
    "loggers": {
      "href": "http://localhost:8081/actuator/loggers",
      "templated": false
    },
    "loggers-name": {
      "href": "http://localhost:8081/actuator/loggers/{name}",
      "templated": true
    },
    "heapdump": {
      "href": "http://localhost:8081/actuator/heapdump",
      "templated": false
    },
    "threaddump": {
      "href": "http://localhost:8081/actuator/threaddump",
      "templated": false
    },
    "metrics": {
      "href": "http://localhost:8081/actuator/metrics",
      "templated": false
    },
    "metrics-requiredMetricName": {
      "href": "http://localhost:8081/actuator/metrics/{requiredMetricName}",
      "templated": true
    },
    "scheduledtasks": {
      "href": "http://localhost:8081/actuator/scheduledtasks",
      "templated": false
    },
    "httptrace": {
      "href": "http://localhost:8081/actuator/httptrace",
      "templated": false
    },
    "mappings": {
      "href": "http://localhost:8081/actuator/mappings",
      "templated": false
    }
  }
}
分享到:
评论

相关推荐

    Spring Boot整合Spring Batch,实现批处理

    6. **监控与调试**:Spring Boot集成了Actuator,可以通过HTTP端点查看批处理作业的状态,也可以通过日志跟踪处理过程。 在这个提供的压缩包文件中,名为"batch"的文件可能包含了一个简单的Spring Boot和Spring ...

    spring boot admin demo 源码 java 服务器 监控

    8. **自定义监控**:除了默认提供的监控项,还可以通过扩展 Spring Boot Actuator 的端点或者实现自定义监控服务,将特定的应用业务指标纳入监控范围。 通过学习和实践这个 Spring Boot Admin Demo,你可以深入了解...

    12Spring Boot Admin:微服务应用监控1

    Spring Boot Admin 是一个基于 Spring Boot 的应用监控工具,可以对 Spring Boot 应用进行监控,提供了详细的应用信息,包括应用运行过程中的概览信息、度量指标信息、环境变量信息、Bean 信息、配置信息、日志信息...

    LEARNING SPRING BOOT 3.0 - THIRD EDITION

    除了基础和核心特性之外,书中还包含了其他重要章节,例如如何处理安全性问题,如何进行应用监控和日志记录,以及如何在云环境中部署Spring Boot应用。这些内容对于希望将应用部署到生产环境的开发者来说尤为关键。...

    最新Spring Boot Admin 官方参考指南-中文版-2.x

    Spring Boot Admin 是一个社区驱动的项目,用于监控和管理基于Spring Boot的应用程序。它通过HTTP接口或者Spring Cloud的服务注册中心(如Eureka、Consul)来注册和发现应用。Spring Boot Admin的用户界面是一个建立...

    Spring Boot实战派(源码)

    - Spring Boot提供`SpringBootTest`注解进行集成测试,`@MockBean`和`@SpyBean`用于模拟或监控bean。 10. **定时任务** - 使用`@Scheduled`注解实现定时任务,或者集成Quartz或CronTrigger。 11. **消息传递** ...

    基于spring boot的后台管理系统源码.rar

    8. **监控与日志**:Spring Boot集成了Actuator模块,提供健康检查、指标展示等功能。源码中的监控配置和日志管理,有助于我们实时了解系统的运行状态。 9. **Docker化部署**:Spring Boot的应用通常会被打包为可...

    从零开始学Spring Boot

    1.36 Spring Boot 监控和管理生产环境 1.37 Spring Boot的启动器Starter详解 1.38 Spring Boot集成Redis实现缓存机制 1.39 Spring Boot Cache理论篇 1.40 Spring Boot集成EHCache实现缓存机制 1.41 Spring Boot...

    十分钟上手spring boot

    本文档旨在帮助初学者快速掌握Spring Boot的基本操作与核心概念,适合那些希望迅速上手Spring Boot项目的新手。 **2. 获取帮助** 对于学习过程中遇到的问题,可以查阅官方文档、社区论坛或加入相关的技术交流群组...

    spring boot 简单实现

    在这个"spring boot简单实现"的项目中,我们可以看到核心关注点是如何设置和使用Spring Boot的拦截器,以及如何将项目构建成一个可直接运行的实例。 首先,我们来深入理解Spring Boot的核心特性: 1. 自动配置:...

    Spring Boot实战 ,丁雪丰 (译者).zip

    此外,Spring Boot还支持Actuator,这是一个用于生产环境的工具集,可以提供健康检查、监控和管理应用的手段。 在实际项目中,书中可能会提到如何利用Spring Boot与Docker结合,实现应用的容器化部署,以及如何使用...

    Spring Boot揭秘 PDF

    5. Actuator:Spring Boot Actuator提供了一套监控和管理应用的端点,例如健康检查、指标展示、审计跟踪等,帮助开发者了解应用在生产环境中的运行状态。 6. 配置文件:Spring Boot支持基于YAML或JSON格式的`...

    spring boot管理系统后台

    【Spring Boot管理后台系统详解】 Spring Boot是一种基于Java的快速开发框架,旨在简化Spring应用程序的初始设置和常规配置。这个“spring boot管理系统后台”项目利用了Spring Boot的强大功能,为后台管理提供了一...

    Spring-Boot-Reference-Guide, Spring Boot Reference Guide中文翻译 -《Spring Boot参考指南》.zip

    《Spring Boot参考指南》是Spring Boot开发者的重要参考资料,它详细阐述了Spring Boot框架的核心特性、配置方式、自动配置原理以及如何构建微服务应用等关键知识点。Spring Boot是Java开发领域中一个极其流行的轻量...

    Spring Boot 2 Cookbook 第二版

    最后,你将学习到如何监控和管理Spring Boot应用,例如使用Actuator提供的健康检查、指标收集、审计日志等功能。 总的来说,《Spring Boot 2 Cookbook 第二版》是一本全面而实用的参考书,无论你是初学者还是有经验...

    Spring cloud spring boot spring boot admin

    Spring Boot Admin客户端需要集成到Spring Boot应用中,然后通过HTTP接口与Spring Boot Admin服务器端进行通信,实现对各个微服务实例的实时监控。 在"spring-boot-admin-master"这个压缩包中,很可能是包含了...

    Spring Boot Tutorial 《Spring Boot 教程》

    《Spring Boot 教程》是面向开发者的一份详尽指南,旨在帮助他们快速掌握Spring Boot框架,以便...同时,结合提供的"jpa-in-action"子文件,你可以深入了解Spring Boot如何与JPA配合,实现数据的CRUD操作和复杂查询。

    《Spring Boot企业级开发教程》配套资料

    同时,PPT可能还会涉及Spring Boot如何与Spring框架其他模块集成,如数据访问(JPA、MyBatis)、安全(Spring Security)、缓存(Redis)等。 配套视频教程是理论知识的补充,通常会演示实际操作过程,包括项目的...

    Spring Boot-实战

    《Spring Boot-实战》这本书是针对Java开发人员的一份实用指南,主要聚焦于Spring Boot框架的应用与实践。Spring Boot是Spring生态系统中的一个关键组件,它旨在简化Spring应用程序的初始搭建以及开发过程,使得...

    Spring+Boot实战

    同时,Spring Boot对Actuator模块的介绍,将让读者了解到如何监控和管理运行中的应用,包括健康检查、指标收集、日志管理和端点安全控制。 微服务架构方面,Spring Boot提供了构建分布式系统的能力,如服务发现、...

Global site tag (gtag.js) - Google Analytics