Create spring-boot-amqp module

This commit is contained in:
Brian Clozel
2025-03-14 18:01:17 +01:00
committed by Phillip Webb
parent b3ada036c8
commit 5ac2ad6c11
49 changed files with 124 additions and 89 deletions

View File

@@ -42,6 +42,7 @@ include "spring-boot-project:spring-boot-actuator"
include "spring-boot-project:spring-boot-actuator-autoconfigure"
include "spring-boot-project:spring-boot-all"
include "spring-boot-project:spring-boot-all-integration-tests"
include "spring-boot-project:spring-boot-amqp"
include "spring-boot-project:spring-boot-autoconfigure"
include "spring-boot-project:spring-boot-autoconfigure-all"
include "spring-boot-project:spring-boot-dependencies"

View File

@@ -17,6 +17,7 @@ dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
optional(project(":spring-boot-project:spring-boot-amqp"))
optional(project(":spring-boot-project:spring-boot-jetty"))
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
optional(project(":spring-boot-project:spring-boot-tomcat"))

View File

@@ -22,9 +22,9 @@ import org.springframework.boot.actuate.amqp.RabbitHealthIndicator;
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.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;

View File

@@ -22,9 +22,9 @@ import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.amqp.rabbit.connection.AbstractConnectionFactory;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.ApplicationContext;

View File

@@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.amqp.RabbitHealthIndicator;
import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration;
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -24,7 +24,7 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.amqp.RabbitMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

View File

@@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -0,0 +1,23 @@
plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot AMQP"
dependencies {
api(project(":spring-boot-project:spring-boot"))
api("org.springframework:spring-messaging")
api("org.springframework.amqp:spring-rabbit")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("org.springframework.amqp:spring-rabbit-stream")
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testRuntimeOnly("ch.qos.logback:logback-classic")
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.stream.Collectors;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.List;
import java.util.concurrent.Executor;
@@ -25,7 +25,7 @@ import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.retry.MessageRecoverer;
import org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.boot.autoconfigure.amqp.RabbitProperties.ListenerRetry;
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.ListenerRetry;
import org.springframework.retry.support.RetryTemplate;
import org.springframework.util.Assert;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.time.Duration;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import com.rabbitmq.client.ConnectionFactory;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;

View File

@@ -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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import com.rabbitmq.stream.Environment;
import com.rabbitmq.stream.EnvironmentBuilder;

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.ArrayList;
import java.util.List;
import org.springframework.boot.autoconfigure.amqp.RabbitProperties.Ssl;
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.Ssl;
import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.util.Assert;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.config.ContainerCustomizer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.impl.CredentialsProvider;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.time.Duration;
@@ -22,7 +22,7 @@ import com.rabbitmq.client.impl.CredentialsProvider;
import com.rabbitmq.client.impl.CredentialsRefreshService;
import org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails.Address;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.ssl.SslBundles;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.time.Duration;
import java.time.temporal.ChronoUnit;

View File

@@ -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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.function.Function;
import java.util.function.Supplier;
@@ -25,7 +25,7 @@ import com.rabbitmq.stream.EnvironmentBuilder;
import org.springframework.amqp.rabbit.config.ContainerCustomizer;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.amqp.RabbitProperties.StreamContainer;
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.StreamContainer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.rabbit.stream.producer.ProducerCustomizer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.time.Duration;
import java.util.List;

View File

@@ -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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@@ -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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.time.Duration;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;

View File

@@ -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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean;
import org.springframework.boot.ssl.SslBundle;

View File

@@ -17,4 +17,4 @@
/**
* Auto-configuration for RabbitMQ.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;

View File

@@ -0,0 +1,33 @@
{
"groups": [],
"properties": [
{
"name": "spring.rabbitmq.dynamic",
"type": "java.lang.Boolean",
"description": "Whether to create an AmqpAdmin bean.",
"defaultValue": true
},
{
"name": "spring.rabbitmq.listener.simple.transaction-size",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.rabbitmq.publisher-confirms",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.rabbitmq.template.queue",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.rabbitmq.template.default-receive-queue",
"level": "error"
}
}
]
}

View File

@@ -0,0 +1 @@
org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration

View File

@@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails.Address;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
import org.springframework.boot.ssl.DefaultSslBundleRegistry;
import org.springframework.boot.ssl.SslBundle;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.security.NoSuchAlgorithmException;
import java.util.Collection;
@@ -910,7 +910,7 @@ class RabbitAutoConfigurationTests {
void enableSslWithBundle() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.ssl.bundle=test-bundle",
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.ssl.bundle.jks.test-bundle.keystore.password=secret")
.run((context) -> {
com.rabbitmq.client.ConnectionFactory rabbitConnectionFactory = getTargetConnectionFactory(context);
@@ -922,9 +922,9 @@ class RabbitAutoConfigurationTests {
void enableSslWithKeystoreTypeAndTrustStoreTypeShouldWork() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.rabbitmq.ssl.key-store-type=jks", "spring.rabbitmq.ssl.key-store-password=secret",
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.rabbitmq.ssl.trust-store-type=jks", "spring.rabbitmq.ssl.trust-store-password=secret")
.run((context) -> assertThat(context).hasNotFailed());
}
@@ -956,10 +956,10 @@ class RabbitAutoConfigurationTests {
void enableSslWithValidStoreAlgorithmShouldWork() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.rabbitmq.ssl.key-store-type=jks", "spring.rabbitmq.ssl.key-store-password=secret",
"spring.rabbitmq.ssl.key-store-algorithm=PKIX",
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.rabbitmq.ssl.trust-store-type=jks", "spring.rabbitmq.ssl.trust-store-password=secret",
"spring.rabbitmq.ssl.trust-store-algorithm=PKIX")
.run((context) -> assertThat(context).hasNotFailed());
@@ -969,7 +969,7 @@ class RabbitAutoConfigurationTests {
void enableSslWithInvalidKeyStoreAlgorithmShouldFail() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.rabbitmq.ssl.key-store-type=jks", "spring.rabbitmq.ssl.key-store-password=secret",
"spring.rabbitmq.ssl.key-store-algorithm=test-invalid-algo")
.run((context) -> {
@@ -983,7 +983,7 @@ class RabbitAutoConfigurationTests {
void enableSslWithInvalidTrustStoreAlgorithmShouldFail() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/autoconfigure/amqp/test.jks",
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
"spring.rabbitmq.ssl.trust-store-type=jks", "spring.rabbitmq.ssl.trust-store-password=secret",
"spring.rabbitmq.ssl.trust-store-algorithm=test-invalid-algo")
.run((context) -> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.util.List;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 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.autoconfigure.amqp;
package org.springframework.boot.amqp.autoconfigure;
import java.time.Duration;
import java.util.List;

View File

@@ -1791,34 +1791,6 @@
"name": "spring.quartz.scheduler-name",
"defaultValue": "quartzScheduler"
},
{
"name": "spring.rabbitmq.dynamic",
"type": "java.lang.Boolean",
"description": "Whether to create an AmqpAdmin bean.",
"defaultValue": true
},
{
"name": "spring.rabbitmq.listener.simple.transaction-size",
"type": "java.lang.Integer",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.rabbitmq.publisher-confirms",
"type": "java.lang.Boolean",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.rabbitmq.template.queue",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.rabbitmq.template.default-receive-queue",
"level": "error"
}
},
{
"name": "spring.reactor.stacktrace-mode.enabled",
"description": "Whether Reactor should collect stacktrace information at runtime.",

View File

@@ -1,5 +1,4 @@
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration

View File

@@ -1976,6 +1976,7 @@ bom {
"spring-boot",
"spring-boot-actuator",
"spring-boot-actuator-autoconfigure",
"spring-boot-amqp",
"spring-boot-autoconfigure",
"spring-boot-autoconfigure-processor",
"spring-boot-buildpack-platform",

View File

@@ -30,6 +30,7 @@ dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names")
optional(project(":spring-boot-project:spring-boot-amqp"))
optional(project(":spring-boot-project:spring-boot-autoconfigure-all"))
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional("com.hazelcast:hazelcast")

View File

@@ -16,8 +16,8 @@
package org.springframework.boot.docker.compose.service.connection.rabbit;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails.Address;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
import org.springframework.boot.testsupport.container.TestImage;

View File

@@ -18,7 +18,7 @@ package org.springframework.boot.docker.compose.service.connection.rabbit;
import java.util.List;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;

View File

@@ -59,6 +59,7 @@ plugins.withType(EclipsePlugin) {
}
dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-amqp", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata"))
@@ -70,6 +71,7 @@ dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "autoConfigurationMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-amqp", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-actuator", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "configurationPropertiesMetadata"))
@@ -88,6 +90,7 @@ dependencies {
implementation(project(path: ":spring-boot-project:spring-boot-actuator"))
implementation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure"))
implementation(project(path: ":spring-boot-project:spring-boot-amqp"))
implementation(project(path: ":spring-boot-project:spring-boot-autoconfigure-all"))
implementation(project(path: ":spring-boot-project:spring-boot-devtools"))
implementation(project(path: ":spring-boot-project:spring-boot-docker-compose"))

View File

@@ -18,7 +18,7 @@ package org.springframework.boot.docs.messaging.amqp.receiving.custom;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer;
import org.springframework.boot.amqp.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -18,7 +18,7 @@ package org.springframework.boot.docs.messaging.amqp.receiving.custom
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory
import org.springframework.amqp.rabbit.connection.ConnectionFactory
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer
import org.springframework.boot.amqp.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

View File

@@ -6,6 +6,5 @@ description = "Starter for using Spring AMQP and Rabbit MQ"
dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api("org.springframework:spring-messaging")
api("org.springframework.amqp:spring-rabbit")
api(project(":spring-boot-project:spring-boot-amqp"))
}

View File

@@ -52,6 +52,7 @@ dependencies {
dockerTestRuntimeOnly("org.flywaydb:flyway-database-postgresql")
dockerTestRuntimeOnly("org.postgresql:postgresql")
optional(project(":spring-boot-project:spring-boot-amqp"))
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional("org.springframework:spring-test")
optional("org.springframework.data:spring-data-mongodb")

View File

@@ -30,9 +30,9 @@ import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Bean;

View File

@@ -21,7 +21,7 @@ import java.util.List;
import org.testcontainers.containers.RabbitMQContainer;
import org.springframework.boot.autoconfigure.amqp.RabbitConnectionDetails;
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;