diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java index 35c2a3785b..d2d0eb30db 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java @@ -22,7 +22,6 @@ import java.util.List; import org.springframework.amqp.core.AcknowledgeMode; import org.springframework.amqp.rabbit.connection.CachingConnectionFactory.CacheMode; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; @@ -502,100 +501,6 @@ public class RabbitProperties { this.type = containerType; } - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.auto-startup") - @Deprecated - public boolean isAutoStartup() { - return getSimple().isAutoStartup(); - } - - @Deprecated - public void setAutoStartup(boolean autoStartup) { - getSimple().setAutoStartup(autoStartup); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.acknowledge-mode") - @Deprecated - public AcknowledgeMode getAcknowledgeMode() { - return getSimple().getAcknowledgeMode(); - } - - @Deprecated - public void setAcknowledgeMode(AcknowledgeMode acknowledgeMode) { - getSimple().setAcknowledgeMode(acknowledgeMode); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.concurrency") - @Deprecated - public Integer getConcurrency() { - return getSimple().getConcurrency(); - } - - @Deprecated - public void setConcurrency(Integer concurrency) { - getSimple().setConcurrency(concurrency); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.max-concurrency") - @Deprecated - public Integer getMaxConcurrency() { - return getSimple().getMaxConcurrency(); - } - - @Deprecated - public void setMaxConcurrency(Integer maxConcurrency) { - getSimple().setMaxConcurrency(maxConcurrency); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.prefetch") - @Deprecated - public Integer getPrefetch() { - return getSimple().getPrefetch(); - } - - @Deprecated - public void setPrefetch(Integer prefetch) { - getSimple().setPrefetch(prefetch); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.transaction-size") - @Deprecated - public Integer getTransactionSize() { - return getSimple().getTransactionSize(); - } - - @Deprecated - public void setTransactionSize(Integer transactionSize) { - getSimple().setTransactionSize(transactionSize); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.default-requeue-rejected") - @Deprecated - public Boolean getDefaultRequeueRejected() { - return getSimple().getDefaultRequeueRejected(); - } - - @Deprecated - public void setDefaultRequeueRejected(Boolean defaultRequeueRejected) { - getSimple().setDefaultRequeueRejected(defaultRequeueRejected); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.idle-event-interval") - @Deprecated - public Long getIdleEventInterval() { - return getSimple().getIdleEventInterval(); - } - - @Deprecated - public void setIdleEventInterval(Long idleEventInterval) { - getSimple().setIdleEventInterval(idleEventInterval); - } - - @DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.retry") - @Deprecated - public ListenerRetry getRetry() { - return getSimple().getRetry(); - } - public SimpleContainer getSimple() { return this.simple; } diff --git a/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 447876ff98..9bb77b8370 100644 --- a/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -363,72 +363,6 @@ "description": "Create an AmqpAdmin bean.", "defaultValue": true }, - { - "name": "spring.rabbitmq.listener.retry.enabled", - "type": "java.lang.Boolean", - "description": "Whether or not publishing retries are enabled.", - "sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry", - "defaultValue": false, - "deprecated": true, - "deprecation": { - "replacement": "spring.rabbitmq.listener.simple.retry.enabled" - } - }, - { - "name": "spring.rabbitmq.listener.retry.initial-interval", - "type": "java.lang.Long", - "description": "Interval between the first and second attempt to publish or deliver a message.", - "sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry", - "defaultValue": 1000, - "deprecated": true, - "deprecation": { - "replacement": "spring.rabbitmq.listener.simple.retry.initial-interval" - } - }, - { - "name": "spring.rabbitmq.listener.retry.max-attempts", - "type": "java.lang.Integer", - "description": "Maximum number of attempts to publish or deliver a message.", - "sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry", - "defaultValue": 3, - "deprecated": true, - "deprecation": { - "replacement": "spring.rabbitmq.listener.simple.retry.max-attempts" - } - }, - { - "name": "spring.rabbitmq.listener.retry.max-interval", - "type": "java.lang.Long", - "description": "Maximum interval between attempts.", - "sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry", - "defaultValue": 10000, - "deprecated": true, - "deprecation": { - "replacement": "spring.rabbitmq.listener.simple.retry.max-interval" - } - }, - { - "name": "spring.rabbitmq.listener.retry.multiplier", - "type": "java.lang.Double", - "description": "A multiplier to apply to the previous retry interval.", - "sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry", - "defaultValue": 1, - "deprecated": true, - "deprecation": { - "replacement": "spring.rabbitmq.listener.simple.retry.multiplier" - } - }, - { - "name": "spring.rabbitmq.listener.retry.stateless", - "type": "java.lang.Boolean", - "description": "Whether or not retries are stateless or stateful.", - "sourceType": "org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry", - "defaultValue": true, - "deprecated": true, - "deprecation": { - "replacement": "spring.rabbitmq.listener.simple.retry.stateless" - } - }, { "name": "spring.session.hazelcast.flush-mode", "defaultValue": "on-save" diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java index 7272aa175e..98058a3ceb 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java @@ -293,28 +293,10 @@ public class RabbitAutoConfigurationTests { assertThat(adviceChain).isNull(); } - @Test - @Deprecated - public void testSimpleRabbitListenerContainerFactoryWithCustomDeprecatedSettings() { - testSimpleRabbitListenerContainerFactoryWithCustomSettings( - "spring.rabbitmq.listener.retry.enabled:true", - "spring.rabbitmq.listener.retry.maxAttempts:4", - "spring.rabbitmq.listener.retry.initialInterval:2000", - "spring.rabbitmq.listener.retry.multiplier:1.5", - "spring.rabbitmq.listener.retry.maxInterval:5000", - "spring.rabbitmq.listener.autoStartup:false", - "spring.rabbitmq.listener.acknowledgeMode:manual", - "spring.rabbitmq.listener.concurrency:5", - "spring.rabbitmq.listener.maxConcurrency:10", - "spring.rabbitmq.listener.prefetch:40", - "spring.rabbitmq.listener.defaultRequeueRejected:false", - "spring.rabbitmq.listener.idleEventInterval:5", - "spring.rabbitmq.listener.transactionSize:20"); - } - @Test public void testSimpleRabbitListenerContainerFactoryWithCustomSettings() { - testSimpleRabbitListenerContainerFactoryWithCustomSettings( + load(new Class[] { MessageConvertersConfiguration.class, + MessageRecoverersConfiguration.class }, "spring.rabbitmq.listener.simple.retry.enabled:true", "spring.rabbitmq.listener.simple.retry.maxAttempts:4", "spring.rabbitmq.listener.simple.retry.initialInterval:2000", @@ -328,11 +310,6 @@ public class RabbitAutoConfigurationTests { "spring.rabbitmq.listener.simple.defaultRequeueRejected:false", "spring.rabbitmq.listener.simple.idleEventInterval:5", "spring.rabbitmq.listener.simple.transactionSize:20"); - } - - private void testSimpleRabbitListenerContainerFactoryWithCustomSettings(String... environment) { - load(new Class[] { MessageConvertersConfiguration.class, - MessageRecoverersConfiguration.class }, environment); SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory = this.context .getBean("rabbitListenerContainerFactory", SimpleRabbitListenerContainerFactory.class);