简体   繁体   English

如何使用 Spring boot 3.x 和 Spring WebFlux 启用 POST env 管理端点?

[英]How to enable POST env management endpoint with Spring boot 3.x and Spring WebFlux?

How to enable POST env management endpoint with Spring boot 3.x and Spring WebFlux?如何使用 Spring boot 3.x 和 Spring WebFlux 启用 POST env 管理端点?

This was working fine with Spring Boot 2.7.x and is no more working with Spring Boot 3.x.这在 Spring Boot 2.7.x 上运行良好,在 Spring Boot 3.x 上不再适用。

Activating the debug mode (debug: true) I can't find any trace of WritableEnvironmentEndpointAutoConfiguration .激活调试模式 (debug: true) 我找不到WritableEnvironmentEndpointAutoConfiguration的任何踪迹。

Here is the relevant part of my application.yml.这是我的 application.yml 的相关部分。

management:
  endpoints:
    enabled-by-default: true
    web:
      exposure:
        include: '*'
  endpoint:
    env:
      post:
        enabled: true
      enabled: true
    health:
      probes:
        enabled: true
      show-details: always

The current latest version of spring-cloud-dependencies is not compatible with Spring Boot 3.X.当前最新版本的 spring-cloud-dependencies 与 Spring Boot 3.X 不兼容。

It is necessary to migrate to a newer version to make it work.有必要迁移到更新的版本以使其工作。

At the time of writing I used the following combination which was working:在撰写本文时,我使用了以下有效的组合:

implementation(platform("org.springframework.boot:spring-boot-dependencies:3.0.0"))
implementation(platform("org.springframework.cloud:spring-cloud-dependencies:2022.0.0"))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM