Skip to content

Commit 7514b40

Browse files
committed
Move code from spring-boot-actuator to spring-boot-jms
1 parent 8b2be45 commit 7514b40

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jms/JmsHealthContributorAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
import org.springframework.boot.actuate.autoconfigure.health.CompositeHealthContributorConfiguration;
2323
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
2424
import org.springframework.boot.actuate.health.HealthContributor;
25-
import org.springframework.boot.actuate.jms.JmsHealthIndicator;
2625
import org.springframework.boot.autoconfigure.AutoConfiguration;
2726
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2827
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2928
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3029
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
30+
import org.springframework.boot.jms.actuate.health.JmsHealthIndicator;
3131
import org.springframework.context.annotation.Bean;
3232

3333
/**
@@ -38,7 +38,7 @@
3838
*/
3939
@AutoConfiguration(afterName = { "org.springframework.boot.activemq.autoconfigure.ActiveMQAutoConfiguration",
4040
"org.springframework.boot.artemis.autoconfigure.ArtemisAutoConfiguration" })
41-
@ConditionalOnClass(ConnectionFactory.class)
41+
@ConditionalOnClass({ ConnectionFactory.class, JmsHealthIndicator.class })
4242
@ConditionalOnBean(ConnectionFactory.class)
4343
@ConditionalOnEnabledHealthIndicator("jms")
4444
public class JmsHealthContributorAutoConfiguration

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/jms/JmsHealthContributorAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
import org.junit.jupiter.api.Test;
2020

2121
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
22-
import org.springframework.boot.actuate.jms.JmsHealthIndicator;
2322
import org.springframework.boot.actuate.ldap.LdapHealthIndicator;
2423
import org.springframework.boot.artemis.autoconfigure.ArtemisAutoConfiguration;
2524
import org.springframework.boot.autoconfigure.AutoConfigurations;
25+
import org.springframework.boot.jms.actuate.health.JmsHealthIndicator;
2626
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2727

2828
import static org.assertj.core.api.Assertions.assertThat;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ dependencies {
2323
dockerTestImplementation("org.testcontainers:neo4j")
2424
dockerTestImplementation("org.testcontainers:testcontainers")
2525

26-
optional(project(":spring-boot-project:spring-boot-activemq"))
2726
optional(project(":spring-boot-project:spring-boot-http-converter"))
2827
optional(project(":spring-boot-project:spring-boot-jdbc"))
2928
optional(project(":spring-boot-project:spring-boot-jetty"))

spring-boot-project/spring-boot-jms/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ dependencies {
1313
api(project(":spring-boot-project:spring-boot-tx"))
1414
api("jakarta.jms:jakarta.jms-api")
1515
api("org.springframework:spring-jms")
16+
17+
compileOnly("com.fasterxml.jackson.core:jackson-annotations")
1618

19+
optional(project(":spring-boot-project:spring-boot-actuator"))
1720
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
1821
optional("jakarta.transaction:jakarta.transaction-api")
1922
optional("org.messaginghub:pooled-jms") {
2023
exclude group: "org.apache.geronimo.specs", module: "geronimo-jms_2.0_spec"
2124
}
2225
optional("org.springframework:spring-jdbc")
26+
27+
testCompileOnly("com.fasterxml.jackson.core:jackson-annotations")
2328

2429
testImplementation(project(":spring-boot-project:spring-boot-test"))
2530
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.jms;
17+
package org.springframework.boot.jms.actuate.health;
1818

1919
import java.util.concurrent.CountDownLatch;
2020
import java.util.concurrent.TimeUnit;
@@ -33,7 +33,7 @@
3333
* {@link HealthIndicator} for a JMS {@link ConnectionFactory}.
3434
*
3535
* @author Stephane Nicoll
36-
* @since 2.0.0
36+
* @since 4.0.0
3737
*/
3838
public class JmsHealthIndicator extends AbstractHealthIndicator {
3939

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,6 +15,6 @@
1515
*/
1616

1717
/**
18-
* Actuator support for JMS.
18+
* Health integration for JMS.
1919
*/
20-
package org.springframework.boot.actuate.jms;
20+
package org.springframework.boot.jms.actuate.health;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.actuate.jms;
17+
package org.springframework.boot.jms.actuate.health;
1818

1919
import jakarta.jms.Connection;
2020
import jakarta.jms.ConnectionFactory;

0 commit comments

Comments
 (0)