Skip to content

Commit e3facf6

Browse files
committed
Create spring-boot-amqp module
1 parent 4697703 commit e3facf6

File tree

49 files changed

+132
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+132
-92
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ include "spring-boot-project:spring-boot-tools:spring-boot-properties-migrator"
5757
include "spring-boot-project:spring-boot-tools:spring-boot-test-support"
5858
include "spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"
5959
include "spring-boot-project:spring-boot"
60+
include "spring-boot-project:spring-boot-amqp"
6061
include "spring-boot-project:spring-boot-autoconfigure"
6162
include "spring-boot-project:spring-boot-autoconfigure-all"
6263
include "spring-boot-project:spring-boot-actuator"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies {
1717
implementation("com.fasterxml.jackson.core:jackson-databind")
1818
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
1919

20+
optional(project(":spring-boot-project:spring-boot-amqp"))
2021
optional(project(":spring-boot-project:spring-boot-jetty"))
2122
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
2223
optional(project(":spring-boot-project:spring-boot-tomcat"))

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/amqp/RabbitHealthContributorAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
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.amqp.autoconfigure.RabbitAutoConfiguration;
2526
import org.springframework.boot.autoconfigure.AutoConfiguration;
2627
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/amqp/RabbitMetricsAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
import org.springframework.amqp.rabbit.connection.AbstractConnectionFactory;
2323
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
2424
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
25+
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
2526
import org.springframework.boot.autoconfigure.AutoConfiguration;
2627
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3030
import org.springframework.context.ApplicationContext;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/amqp/RabbitHealthContributorAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
import org.springframework.boot.actuate.amqp.RabbitHealthIndicator;
2222
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
23+
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
2324
import org.springframework.boot.autoconfigure.AutoConfigurations;
24-
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
2525
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2626

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

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/amqp/RabbitMetricsAutoConfigurationMeterBinderCycleIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
2525
import org.springframework.boot.actuate.autoconfigure.metrics.amqp.RabbitMetricsAutoConfiguration;
2626
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
27+
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
2828
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
2929
import org.springframework.context.annotation.Configuration;
3030
import org.springframework.context.annotation.Import;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/amqp/RabbitMetricsAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
2323
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
2424
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
25+
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
2526
import org.springframework.boot.autoconfigure.AutoConfigurations;
26-
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
2727
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2828
import org.springframework.context.annotation.Bean;
2929
import org.springframework.context.annotation.Configuration;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.auto-configuration"
4+
id "org.springframework.boot.configuration-properties"
5+
id "org.springframework.boot.deployed"
6+
id "org.springframework.boot.optional-dependencies"
7+
}
8+
9+
description = "Spring Boot AMQP"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot"))
13+
api("org.springframework:spring-messaging")
14+
api("org.springframework.amqp:spring-rabbit")
15+
16+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
17+
optional("org.springframework.amqp:spring-rabbit-stream")
18+
19+
testImplementation(project(":spring-boot-project:spring-boot-test"))
20+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
21+
testImplementation("org.assertj:assertj-core")
22+
testImplementation("org.awaitility:awaitility")
23+
testImplementation("org.junit.jupiter:junit-jupiter")
24+
testImplementation("org.mockito:mockito-core")
25+
testImplementation("org.mockito:mockito-junit-jupiter")
26+
27+
testRuntimeOnly("ch.qos.logback:logback-classic")
28+
}
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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.util.stream.Collectors;
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.util.List;
2020
import java.util.concurrent.Executor;
@@ -26,7 +26,7 @@
2626
import org.springframework.amqp.rabbit.retry.MessageRecoverer;
2727
import org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer;
2828
import org.springframework.amqp.support.converter.MessageConverter;
29-
import org.springframework.boot.autoconfigure.amqp.RabbitProperties.ListenerRetry;
29+
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.ListenerRetry;
3030
import org.springframework.retry.support.RetryTemplate;
3131
import org.springframework.util.Assert;
3232

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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.time.Duration;
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import com.rabbitmq.client.ConnectionFactory;
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory;
2020
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
Lines changed: 2 additions & 2 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import com.rabbitmq.stream.Environment;
2020
import com.rabbitmq.stream.EnvironmentBuilder;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.util.ArrayList;
2020
import java.util.List;
2121

22-
import org.springframework.boot.autoconfigure.amqp.RabbitProperties.Ssl;
22+
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.Ssl;
2323
import org.springframework.boot.ssl.SslBundle;
2424
import org.springframework.boot.ssl.SslBundles;
2525
import org.springframework.util.Assert;
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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
2020
import org.springframework.amqp.rabbit.config.ContainerCustomizer;
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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import com.rabbitmq.client.Channel;
2020
import com.rabbitmq.client.impl.CredentialsProvider;
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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.util.List;
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.time.Duration;
2020

2121
import com.rabbitmq.client.impl.CredentialsProvider;
2222
import com.rabbitmq.client.impl.CredentialsRefreshService;
2323

2424
import org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean;
25-
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails.Address;
25+
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
2626
import org.springframework.boot.context.properties.PropertyMapper;
2727
import org.springframework.boot.ssl.SslBundle;
2828
import org.springframework.boot.ssl.SslBundles;
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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.time.Duration;
2020
import java.time.temporal.ChronoUnit;
Lines changed: 2 additions & 2 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.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.rabbit.core.RabbitTemplate;
2020
import org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.util.function.Function;
2020
import java.util.function.Supplier;
@@ -25,7 +25,7 @@
2525
import org.springframework.amqp.rabbit.config.ContainerCustomizer;
2626
import org.springframework.amqp.support.converter.MessageConverter;
2727
import org.springframework.beans.factory.ObjectProvider;
28-
import org.springframework.boot.autoconfigure.amqp.RabbitProperties.StreamContainer;
28+
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.StreamContainer;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
3131
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.support.converter.MessageConverter;
2020
import org.springframework.rabbit.stream.producer.ProducerCustomizer;
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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.time.Duration;
2020
import java.util.List;
Lines changed: 2 additions & 2 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.rabbit.core.RabbitTemplate;
2020

Lines changed: 2 additions & 2 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import java.time.Duration;
2020
import java.util.List;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
2020
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
Lines changed: 2 additions & 2 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.autoconfigure.amqp;
17+
package org.springframework.boot.amqp.autoconfigure;
1818

1919
import org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean;
2020
import org.springframework.boot.ssl.SslBundle;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
/**
1818
* Auto-configuration for RabbitMQ.
1919
*/
20-
package org.springframework.boot.autoconfigure.amqp;
20+
package org.springframework.boot.amqp.autoconfigure;

0 commit comments

Comments
 (0)