Skip to content

修复 Spring Boot Actuator 兼容性问题#165

Open
lcy19930619 wants to merge 1 commit intodromara:mainfrom
lcy19930619:main
Open

修复 Spring Boot Actuator 兼容性问题#165
lcy19930619 wants to merge 1 commit intodromara:mainfrom
lcy19930619:main

Conversation

@lcy19930619
Copy link
Copy Markdown

背景说明:

在使用 Spring Boot 2.x + Spring Boot Actuator 时,与Actuator 自带的 Elasticsearch 健康检查对客户端集成存在问题。Actuator 默认依赖 Spring Boot 内置 Elasticsearch 客户端配置,当项目使用 自定义 easy-es 的 Elasticsearch Client 时,Actuator 无法正确获取实际的 Elasticsearch 连接信息,健康检查默认指向 localhost,导致 Spring Boot Admin 健康状态不准确。

本次改动目的:

本合并请求引入一个 Elasticsearch Health Adapter,用于:

  • 适配自定义 Elasticsearch 客户端
  • 将真实的 Elasticsearch 集群健康信息上报给 Spring Boot Actuator
  • 使 Spring Boot Admin 能正确展示 Elasticsearch 集群状态

#自动装配支持

  • 提供 Spring Boot 自动装配(AutoConfiguration)
  • 支持通过配置开关启用或关闭健康检查
easy-es:
  health:
    elasticsearch:
      enabled: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant