The use of the 2.X edition is different from that of the 1.X edition, which has the following rules:

  • To expose endpoints via SpringBoot2.0, both enabled and exposed must be enabled.
  • In addition to all/healthand/infoAre not exposed by default.
  • In addition to all/shutdownAre enabled by default.
  • Default access pathhttp://ip:port/actuator/xxx

Endpoint configuration

management:
  endpoint.shutdown.enabled: true # open shutdown
  endpoints.web.exposure.include: "*" Expose all endpoints
  endpoint.health.show-details: always # health Displays detailed information about the health check
# endpoint.web.base-path: /monitor # monitor endpoint.web.base-path: /monitor
Port: 30101 # monitor endpoint configured separately (default is service port)
Copy the code

Common endpoints can be referred to the SpringBoot1.x version.

Refer to the link

  • Spring Boot 2.0 starts the method for monitoring endpoints
  • Springboot 2.0 operating status monitoring uses the OPERATING Actuator

The code address

  • Github:github.com/senlinmu100…
  • Gitee:gitee.com/ppbin/sprin…

Personal website

  • Gitee Pages
  • Github Pages