【问题标题】:How to enable POST env management endpoint with Spring boot 3.x and Spring WebFlux?如何使用 Spring boot 3.x 和 Spring WebFlux 启用 POST 环境管理端点?
【发布时间】:2022-12-22 18:29:28
【问题描述】:

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

这在 Spring Boot 2.7.x 上运行良好,在 Spring Boot 3.x 上不再适用。

激活调试模式 (debug: true) 我找不到任何 WritableEnvironmentEndpointAutoConfiguration 的踪迹。

这是我的 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

【问题讨论】:

    标签: java spring-boot spring-boot-actuator


    【解决方案1】:

    当前最新版本的 spring-cloud-dependencies 与 Spring Boot 3.X 不兼容。

    有必要迁移到更新的版本以使其工作。

    在撰写本文时,我使用了以下有效的组合:

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

    【讨论】:

      猜你喜欢
      • 2017-12-15
      • 2019-04-25
      • 2020-02-09
      • 2015-09-17
      • 2018-10-26
      • 2019-10-28
      • 1970-01-01
      • 1970-01-01
      • 2020-05-31
      相关资源
      最近更新 更多