Browse Source

Move code from spring-boot-actuator to spring-boot-hazelcast

See gh-46099
pull/46230/head
Andy Wilkinson 8 months ago
parent
commit
035d4ffb9c
  1. 4
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfiguration.java
  2. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationIntegrationTests.java
  3. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationTests.java
  4. 2
      spring-boot-project/spring-boot-actuator/build.gradle
  5. 4
      spring-boot-project/spring-boot-hazelcast/build.gradle
  6. 4
      spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/actuate/health/HazelcastHealthIndicator.java
  7. 4
      spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/actuate/health/package-info.java
  8. 2
      spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/actuate/health/HazelcastHealthIndicatorTests.java

4
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfiguration.java

@ -21,13 +21,13 @@ import com.hazelcast.core.HazelcastInstance; @@ -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; @@ -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

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationIntegrationTests.java

@ -20,10 +20,10 @@ import com.hazelcast.core.HazelcastInstance; @@ -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;

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationTests.java

@ -19,8 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.hazelcast; @@ -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;

2
spring-boot-project/spring-boot-actuator/build.gradle

@ -57,7 +57,6 @@ dependencies { @@ -57,7 +57,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")
@ -111,7 +110,6 @@ dependencies { @@ -111,7 +110,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"))

4
spring-boot-project/spring-boot-hazelcast/build.gradle

@ -29,11 +29,15 @@ dependencies { @@ -29,11 +29,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"))

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicator.java → spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/actuate/health/HazelcastHealthIndicator.java

@ -14,7 +14,7 @@ @@ -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; @@ -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 {

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/hazelcast/package-info.java → spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/actuate/health/package-info.java

@ -15,6 +15,6 @@ @@ -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;

2
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java → spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/actuate/health/HazelcastHealthIndicatorTests.java

@ -14,7 +14,7 @@ @@ -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;
Loading…
Cancel
Save