有没有办法在 Spring Boot 2 Actuator 中禁用 ReactiveHealthIndicators?

Den*_*day 4 spring-boot spring-boot-actuator

使用 Spring Boot 2.1.2 执行器。我的类路径中有 Redis。Actuator 会自动启用 RedisReactiveHealthIndicator。我不想要这样。我的应用程序不是反应式的。我想要 RedisHealthIndicator,但反应式正在取代它。

有没有办法停止自动启用反应性健康指标?

小智 8

management.health.redis.enabled = false
Run Code Online (Sandbox Code Playgroud)

将其添加到您的 application.properties 文件中。

希望这可以帮助 ;)