Objective:
In the older version of spring boot, the monitoring endpoint (such as/env) is turned on by default, so that information can be obtained via a URL as long as the project starts properly. However, after the 2.0 release, due to security considerations, except for/health and/info endpoints, the default is not exposed.
So, how do you turn on the monitoring point?
The configuration code for starting and exposing the endpoint is as follows: (in the Application.properties file)
#--------------about the configuration of actuator exposed endpoints (version:spring-boot-2.0)-----------------# Description: # 1. To expose the endpoint through actuator, Must be both enabled and exposed (exposed) # 2. All endpoints except/health and/info are not exposed by default # 3. All endpoints except/shutdown are enabled by default # PS. Production environment due to security issues, be careful not to expose sensitive endpoint # settings to expose all endpoints management.endpoints.web.exposure.include=*# set a single endpoint (/shutdown) Available # management.endpoint.shutdown.enabled=true# settings expose all endpoints, except env#management.endpoints.web.exposure.include=*# Management.endpoints.web.exposure.exclude=env
About the spring boot Boot Monitoring endpoint method (Spring-boot-starter-actuator)