Springboot Actuator Seven: endpoint parsing source code

Look at the package structure actuator projects, as follows:

Introduction Endpoints in this article.

Endpoints (endpoint) Introduction

Endpoints is a core part Actuator, which is used to monitor applications and interactive, spring-boot-actuator has built a lot of Endpoints (health, info, beans, httptrace, shutdown, etc.), but also allows us to expand their endpoint.

Endpoints divided into two categories: primary endpoint and the user-defined endpoints:

  1. Primary endpoint is in an application to provide many restful api interface through which you can monitor the internal status of the application is running. Primary endpoint, and can be divided into three categories:
    • Application configuration class: You can view static information applied during operation: for example, automatic configuration, spring bean information loaded, yml file configuration information, environmental information, request mapping information;
    • Metrics categories: main dynamic information during operation, such as a stack, the request even some health indicators, metrics and other information;
    • Operation control categories: primarily refers to the shutdown, the user may send a request to turn off the monitoring application.
  2. Custom Endpoint mainly refers to the extension, users can according to their practical application, to define some indicators are more concerned about, monitored at runtime.

Achieve org.springframework.boot.actuate.endpoint in detail here be analyzed by the following points:

xxxEndpoint role of
xxxEndpoint fields, constructors
xxxEndpoint core invoke methods to achieve analysis
xxxEndpoint how to configure
xxxEndpoint how automated assembly
Endpoint implementation of the principle of

In org.springframework.boot.actuate.endpoint there are two sub-package -jmx (accessible through the jmx protocol), mvc (, can be carried out by spring mvc exposed through the interface to access, analyze in the next article). Here we do not these concerns, which org.springframework.boot.actuate.endpoint look at the package type, more like, look at a class diagram, right, as follows:


Guess you like

Origin www.cnblogs.com/duanxz/p/11302110.html