Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of invalid management.security.enabled=false in SpringBoot2.x

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report