Move code from spring-boot-actuator to spring-boot-jms
This commit is contained in:
committed by
Phillip Webb
parent
8190edfe28
commit
0e489acfdb
@@ -22,12 +22,12 @@ 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.health.HealthContributor;
|
||||
import org.springframework.boot.actuate.jms.JmsHealthIndicator;
|
||||
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.jms.actuate.health.JmsHealthIndicator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*/
|
||||
@AutoConfiguration(afterName = { "org.springframework.boot.activemq.autoconfigure.ActiveMQAutoConfiguration",
|
||||
"org.springframework.boot.artemis.autoconfigure.ArtemisAutoConfiguration" })
|
||||
@ConditionalOnClass(ConnectionFactory.class)
|
||||
@ConditionalOnClass({ ConnectionFactory.class, JmsHealthIndicator.class })
|
||||
@ConditionalOnBean(ConnectionFactory.class)
|
||||
@ConditionalOnEnabledHealthIndicator("jms")
|
||||
public class JmsHealthContributorAutoConfiguration
|
||||
|
||||
@@ -19,9 +19,9 @@ package org.springframework.boot.actuate.autoconfigure.jms;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.actuate.jms.JmsHealthIndicator;
|
||||
import org.springframework.boot.artemis.autoconfigure.ArtemisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.jms.actuate.health.JmsHealthIndicator;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -23,7 +23,6 @@ dependencies {
|
||||
dockerTestImplementation("org.testcontainers:neo4j")
|
||||
dockerTestImplementation("org.testcontainers:testcontainers")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-http-converter"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
|
||||
@@ -14,6 +14,9 @@ dependencies {
|
||||
api("jakarta.jms:jakarta.jms-api")
|
||||
api("org.springframework:spring-jms")
|
||||
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional("jakarta.transaction:jakarta.transaction-api")
|
||||
optional("org.messaginghub:pooled-jms") {
|
||||
@@ -21,6 +24,7 @@ dependencies {
|
||||
}
|
||||
optional("org.springframework:spring-jdbc")
|
||||
|
||||
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"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.jms;
|
||||
package org.springframework.boot.jms.actuate.health;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -33,7 +33,7 @@ import org.springframework.boot.actuate.health.HealthIndicator;
|
||||
* {@link HealthIndicator} for a JMS {@link ConnectionFactory}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class JmsHealthIndicator 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 JMS.
|
||||
* Health integration for JMS.
|
||||
*/
|
||||
package org.springframework.boot.actuate.jms;
|
||||
package org.springframework.boot.jms.actuate.health;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.jms;
|
||||
package org.springframework.boot.jms.actuate.health;
|
||||
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
Reference in New Issue
Block a user