Move code from spring-boot-actuator to spring-boot-hazelcast
This commit is contained in:
committed by
Phillip Webb
parent
b7588f3ebd
commit
108ee378ff
@@ -21,13 +21,13 @@ import com.hazelcast.core.HazelcastInstance;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
|
||||
import org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator;
|
||||
import org.springframework.boot.actuate.health.HealthContributor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
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.hazelcast.actuate.health.HazelcastHealthIndicator;
|
||||
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* @since 2.2.0
|
||||
*/
|
||||
@AutoConfiguration(after = HazelcastAutoConfiguration.class)
|
||||
@ConditionalOnClass(HazelcastInstance.class)
|
||||
@ConditionalOnClass({ HazelcastInstance.class, HazelcastHealthIndicator.class })
|
||||
@ConditionalOnBean(HazelcastInstance.class)
|
||||
@ConditionalOnEnabledHealthIndicator("hazelcast")
|
||||
public class HazelcastHealthContributorAutoConfiguration
|
||||
|
||||
@@ -20,10 +20,10 @@ import com.hazelcast.core.HazelcastInstance;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator;
|
||||
import org.springframework.boot.actuate.health.Health;
|
||||
import org.springframework.boot.actuate.health.Status;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.hazelcast.actuate.health.HazelcastHealthIndicator;
|
||||
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||
|
||||
@@ -19,8 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.hazelcast;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.hazelcast.actuate.health.HazelcastHealthIndicator;
|
||||
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||
|
||||
@@ -41,7 +41,6 @@ dependencies {
|
||||
optional("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
||||
optional("com.github.ben-manes.caffeine:caffeine")
|
||||
optional("com.google.code.findbugs:jsr305")
|
||||
optional("com.hazelcast:hazelcast-spring")
|
||||
optional("com.zaxxer:HikariCP")
|
||||
optional("io.lettuce:lettuce-core")
|
||||
optional("io.micrometer:micrometer-observation")
|
||||
@@ -95,7 +94,6 @@ dependencies {
|
||||
testFixturesImplementation(project(":spring-boot-project:spring-boot-webmvc"))
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-hazelcast"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-jackson"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-jersey"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
|
||||
@@ -12,11 +12,15 @@ dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("com.hazelcast:hazelcast")
|
||||
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-jpa"))
|
||||
optional("com.hazelcast:hazelcast-spring")
|
||||
optional("org.slf4j:slf4j-api")
|
||||
|
||||
testCompileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.hazelcast;
|
||||
package org.springframework.boot.hazelcast.actuate.health;
|
||||
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Dmytro Nosan
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class HazelcastHealthIndicator extends AbstractHealthIndicator {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Actuator support for Hazelcast.
|
||||
* Health integration for Hazelcast.
|
||||
*/
|
||||
package org.springframework.boot.actuate.hazelcast;
|
||||
package org.springframework.boot.hazelcast.actuate.health;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.hazelcast;
|
||||
package org.springframework.boot.hazelcast.actuate.health;
|
||||
|
||||
import com.hazelcast.core.HazelcastException;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
Reference in New Issue
Block a user