Move Elasticsearch health auto-configuration into spring-boot-elasticsearch
Issue: 46091
This commit is contained in:
parent
b4ac84807d
commit
949cc34bba
|
|
@ -59,28 +59,6 @@
|
|||
"description": "Whether to enable disk space health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.elasticsearch.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Elasticsearch health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.elasticsearch.indices",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
"description": "Comma-separated index names.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.health.elasticsearch.response-timeout",
|
||||
"type": "java.time.Duration",
|
||||
"description": "Time to wait for a response from the cluster.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.health.influxdb.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ org.springframework.boot.actuate.autoconfigure.data.mongo.MongoHealthContributor
|
|||
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoReactiveHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.data.redis.RedisHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.data.redis.RedisReactiveHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchRestHealthContributorAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ package org.springframework.boot.actuate.autoconfigure.data.elasticsearch;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchRestHealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.data.elasticsearch.actuate.health.ElasticsearchReactiveHealthIndicator;
|
||||
import org.springframework.boot.data.elasticsearch.autoconfigure.ElasticsearchDataAutoConfiguration;
|
||||
import org.springframework.boot.elasticsearch.actuate.health.ElasticsearchRestClientHealthIndicator;
|
||||
import org.springframework.boot.elasticsearch.actuate.health.autoconfigure.ElasticsearchRestHealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration;
|
||||
import org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ dependencies {
|
|||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("org.elasticsearch.client:elasticsearch-rest-client")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
optional(project(":spring-boot-project:spring-boot-reactor"))
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.elasticsearch;
|
||||
package org.springframework.boot.elasticsearch.actuate.health.autoconfigure;
|
||||
|
||||
import org.elasticsearch.client.RestClient;
|
||||
|
||||
|
|
@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.elasticsearch.actuate.health.ElasticsearchRestClientHealthIndicator;
|
||||
import org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
|
|
@ -37,9 +38,8 @@ import org.springframework.context.annotation.Bean;
|
|||
* @author Artsiom Yudovin
|
||||
* @since 2.1.1
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
afterName = "org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration")
|
||||
@ConditionalOnClass({ RestClient.class, ElasticsearchRestClientHealthIndicator.class })
|
||||
@AutoConfiguration(after = ElasticsearchRestClientAutoConfiguration.class)
|
||||
@ConditionalOnClass({ RestClient.class, ConditionalOnEnabledHealthIndicator.class })
|
||||
@ConditionalOnBean(RestClient.class)
|
||||
@ConditionalOnEnabledHealthIndicator("elasticsearch")
|
||||
public class ElasticsearchRestHealthContributorAutoConfiguration
|
||||
|
|
@ -15,6 +15,6 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Auto-configuration for actuator Elasticsearch concerns.
|
||||
* Auto-configuration for Elasticsearch health integration.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.elasticsearch;
|
||||
package org.springframework.boot.elasticsearch.actuate.health.autoconfigure;
|
||||
|
|
@ -1,6 +1,28 @@
|
|||
{
|
||||
"groups": [],
|
||||
"properties": [
|
||||
{
|
||||
"name": "management.health.elasticsearch.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether to enable Elasticsearch health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.health.elasticsearch.indices",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
"description": "Comma-separated index names.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.health.elasticsearch.response-timeout",
|
||||
"type": "java.time.Duration",
|
||||
"description": "Time to wait for a response from the cluster.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.elasticsearch.jest.connection-timeout",
|
||||
"type": "java.time.Duration",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
org.springframework.boot.elasticsearch.actuate.health.autoconfigure.ElasticsearchRestHealthContributorAutoConfiguration
|
||||
org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchClientAutoConfiguration
|
||||
org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration
|
||||
org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration
|
||||
org.springframework.boot.elasticsearch.autoconfigure.ReactiveElasticsearchClientAutoConfiguration
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.elasticsearch;
|
||||
package org.springframework.boot.elasticsearch.actuate.health.autoconfigure;
|
||||
|
||||
import org.elasticsearch.client.RestClient;
|
||||
import org.elasticsearch.client.RestClientBuilder;
|
||||
Loading…
Reference in New Issue