docs 补充项目注释
This commit is contained in:
+11
@@ -12,12 +12,23 @@ import org.springframework.core.env.ConfigurableEnvironment;
|
||||
*/
|
||||
public class ActuatorEnvironmentPostProcessor implements EnvironmentPostProcessor, Ordered {
|
||||
|
||||
/**
|
||||
* 根据 easy-es 开关同步设置 Elasticsearch 健康检查开关。
|
||||
*
|
||||
* @param environment Spring 环境配置
|
||||
* @param application Spring 应用实例
|
||||
*/
|
||||
@Override
|
||||
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
|
||||
String enable = environment.getProperty("easy-es.enable", "false");
|
||||
System.setProperty("management.health.elasticsearch.enabled", enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回环境后处理器执行顺序。
|
||||
*
|
||||
* @return 最高优先级
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return Ordered.HIGHEST_PRECEDENCE;
|
||||
|
||||
Reference in New Issue
Block a user