How to solve the problem of invalid management.security.enabled=false in SpringBoot2.x
This article mainly explains "how to solve the invalid management.security.enabled=false in SpringBoot2.x". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to solve the invalid management.security.enabled=false in SpringBoot2.x.
Invalid management.security.enabled=false 1. Expose all endpoints through management.security.enabled=false in version 1.5.x
Specific configuration classes:
Org.springframework.boot.actuate.autoconfigure.ManagementServerProperties$Security II. Switch the SpringBoot version to 2.x and use the search function of IDE
Find the class ManagementServerProperties and find that the inner class of Security has been deleted
Go to the official website to see how 2.0 exposes endpoints.
Method 1:
# enable endpoint envmanagement.endpoint.env.enabled=true # expose multiple endpoint env configurations, separating the management.endpoints.web.exposure.include=env
Mode 2:
The exposure mode in mode 1 requires one to open the endpoints that need to be exposed, and mode 2 directly opens and exposes all endpoints.
Management.endpoints.web.exposure.include=*
Note that you need to add the default / actuator prefix when accessing the endpoint using Http
Management.security.enabled outdated management.security.enabled=true in Spring boot 2.0
Or
Management: security: enabled:true
Can be used
Management.endpoints.web.exposure.include=
Instead of all release, please use *, or use "," to separate the interface endpoints that need to be open, such as env,health.
Yaml configuration * Please add "" (quotation marks) as follows: management: endpoints: web: exposure: include: "* Thank you for reading. The above is the content of" how to solve the invalid management.security.enabled=false in SpringBoot2.x ". After the study of this article, I believe you have a deeper understanding of how to solve the problem of invalid management.security.enabled=false in SpringBoot2.x. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!