update 优化 es 监控开启方式

This commit is contained in:
疯狂的狮子Li
2026-01-16 16:01:06 +08:00
parent f30a5a21c1
commit b24cbfa69b

View File

@@ -14,7 +14,8 @@ public class ActuatorEnvironmentPostProcessor implements EnvironmentPostProcesso
@Override
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
System.setProperty("management.health.elasticsearch.enabled", "false");
String enable = environment.getProperty("easy-es.enable", "false");
System.setProperty("management.health.elasticsearch.enabled", enable);
}
@Override