Home >Java >javaTutorial >How to solve the problem of invalid management.security.enabled=false in SpringBoot2.x
Specific configuration class:
org.springframework.boot.actuate.autoconfigure.ManagementServerProperties$Security
Find the class ManagementServerProperties and found that the Security internal class has been deleted
Method 1:
# 启用端点 env management.endpoint.env.enabled=true # 暴露端点 env 配置多个,隔开 management.endpoints.web.exposure.include=env
Method 2:
Method 1 The exposure method requires opening the endpoints that need to be exposed one by one. Method 2 directly opens and exposes all endpoints
management.endpoints.web.exposure.include=*
Note that when using Http to access the endpoints, you need to add the default /actuator prefix
management.security.enabled=true
or
management: security: enabled:true
can be replaced by
management.endpoints.web.exposure.include=
. Please use * to release all, or Use "," to separate the interface endpoints that need to be opened, such as: env, health.
management: endpoints: web: exposure: include: "*"
The above is the detailed content of How to solve the problem of invalid management.security.enabled=false in SpringBoot2.x. For more information, please follow other related articles on the PHP Chinese website!