Skip to content

Commit 370e943

Browse files
artembilangaryrussell
authored andcommitted
Remove deprecations from previous versions
* Remove Boon dependency and its usage * Remove overloaded methods from the `IntegrationFlowDefinition` - we can simply rely now on the super class * Remove (or rework) deprecated entities in the docs * Fix tests for removed deprecated APIs * Rework affected tests to JUnit 5
1 parent cfaabe2 commit 370e943

File tree

47 files changed

+133
-2687
lines changed

Some content is hidden

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

47 files changed

+133
-2687
lines changed

build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ ext {
5050
assertjVersion = '3.14.0'
5151
assertkVersion = '0.20'
5252
awaitilityVersion = '4.0.1'
53-
boonVersion = '0.34'
5453
commonsDbcp2Version = '2.7.0'
5554
commonsIoVersion = '2.6'
5655
commonsNetVersion = '3.6'
@@ -411,7 +410,6 @@ project('spring-integration-core') {
411410
api 'io.projectreactor:reactor-core'
412411
optionalApi 'com.fasterxml.jackson.core:jackson-databind'
413412
optionalApi "com.jayway.jsonpath:json-path:$jsonpathVersion"
414-
optionalApi "io.fastjson:boon:$boonVersion"
415413
optionalApi "com.esotericsoftware:kryo-shaded:$kryoShadedVersion"
416414
optionalApi "io.micrometer:micrometer-core:$micrometerVersion"
417415
optionalApi "io.github.resilience4j:resilience4j-ratelimiter:$resilience4jVersion"

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AmqpChannelFactoryBean.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -314,16 +314,6 @@ public void setTransactionManager(PlatformTransactionManager transactionManager)
314314
this.transactionManager = transactionManager;
315315
}
316316

317-
/**
318-
* Specify a batch size for consumer.
319-
* @param txSize the batch size to use
320-
* @deprecated since 5.2 in favor of {@link #setBatchSize(Integer)}
321-
*/
322-
@Deprecated
323-
public void setTxSize(int txSize) {
324-
setBatchSize(txSize);
325-
}
326-
327317
public void setBatchSize(Integer batchSize) {
328318
this.batchSize = batchSize;
329319
}

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/AmqpMessageChannelSpec.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2019 the original author or authors.
2+
* Copyright 2014-2020 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.
@@ -202,17 +202,6 @@ public S transactionManager(PlatformTransactionManager transactionManager) {
202202
return _this();
203203
}
204204

205-
/**
206-
* Configure the txSize.
207-
* @param txSize the txSize.
208-
* @return the spec.
209-
* @deprecated since 5.2 in favor of {@link #batchSize(int)}
210-
*/
211-
@Deprecated
212-
public S txSize(int txSize) {
213-
return batchSize(txSize);
214-
}
215-
216205
/**
217206
* Configure the batch size.
218207
* @param batchSize the batchSize.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/dsl/SimpleMessageListenerContainerSpec.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2019 the original author or authors.
2+
* Copyright 2017-2020 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.
@@ -107,17 +107,6 @@ public SimpleMessageListenerContainerSpec receiveTimeout(long receiveTimeout) {
107107
return this;
108108
}
109109

110-
/**
111-
* @param txSize the txSize.
112-
* @return the spec.
113-
* @see SimpleMessageListenerContainer#setBatchSize(int)
114-
* @deprecated since 5.2 in favor of {@link #batchSize(int)}
115-
*/
116-
@Deprecated
117-
public SimpleMessageListenerContainerSpec txSize(int txSize) {
118-
return batchSize(txSize);
119-
}
120-
121110
/**
122111
* The batch size to use.
123112
* @param batchSize the batchSize.

spring-integration-core/src/main/java/org/springframework/integration/aop/MessagePublishingInterceptor.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -79,14 +79,6 @@ public MessagePublishingInterceptor(PublisherMetadataSource metadataSource) {
7979
this.metadataSource = metadataSource;
8080
}
8181

82-
/**
83-
* @param metadataSource the {@link PublisherMetadataSource} to use.
84-
* @deprecated since 5.2 in favor constructor argument.
85-
*/
86-
@Deprecated
87-
public void setPublisherMetadataSource(PublisherMetadataSource metadataSource) {
88-
}
89-
9082
/**
9183
* @param defaultChannelName the default channel name.
9284
* @since 4.0.3

spring-integration-core/src/main/java/org/springframework/integration/channel/AbstractMessageChannel.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -51,6 +51,7 @@
5151
import org.springframework.messaging.MessageDeliveryException;
5252
import org.springframework.messaging.converter.MessageConverter;
5353
import org.springframework.messaging.support.ChannelInterceptor;
54+
import org.springframework.messaging.support.InterceptableChannel;
5455
import org.springframework.util.Assert;
5556
import org.springframework.util.StringUtils;
5657

@@ -68,7 +69,7 @@
6869
@IntegrationManagedResource
6970
@SuppressWarnings("deprecation")
7071
public abstract class AbstractMessageChannel extends IntegrationObjectSupport
71-
implements MessageChannel, TrackableComponent, ChannelInterceptorAware,
72+
implements MessageChannel, TrackableComponent, InterceptableChannel,
7273
org.springframework.integration.support.management.MessageChannelMetrics,
7374
ConfigurableMetricsAware<AbstractMessageChannelMetrics>,
7475
IntegrationPattern {

spring-integration-core/src/main/java/org/springframework/integration/channel/ChannelInterceptorAware.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

spring-integration-core/src/main/java/org/springframework/integration/channel/ExecutorChannelInterceptorAware.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2019 the original author or authors.
2+
* Copyright 2015-2020 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.
@@ -16,8 +16,10 @@
1616

1717
package org.springframework.integration.channel;
1818

19+
import org.springframework.messaging.support.InterceptableChannel;
20+
1921
/**
20-
* The {@link ChannelInterceptorAware} extension for the cases when
22+
* The {@link InterceptableChannel} extension for the cases when
2123
* the {@link org.springframework.messaging.support.ExecutorChannelInterceptor}s
2224
* may have reason (e.g. {@link ExecutorChannel} or {@link QueueChannel})
2325
* and the implementors require to know if they should make the
@@ -28,8 +30,7 @@
2830
*
2931
* @since 4.2
3032
*/
31-
@SuppressWarnings("deprecation")
32-
public interface ExecutorChannelInterceptorAware extends ChannelInterceptorAware {
33+
public interface ExecutorChannelInterceptorAware extends InterceptableChannel {
3334

3435
boolean hasExecutorInterceptors();
3536

spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowAdapter.java

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2020 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.
@@ -179,32 +179,6 @@ protected IntegrationFlowDefinition<?> from(MessagingGatewaySpec<?, ?> inboundGa
179179
return IntegrationFlows.from(inboundGatewaySpec);
180180
}
181181

182-
/**
183-
* @param service service for polling method
184-
* @param methodName method to poll
185-
* @return the IntegrationFlowBuilder
186-
* @deprecated since 5.2 in favor of method reference via {@link #from(Supplier)}
187-
*/
188-
@Deprecated
189-
protected IntegrationFlowBuilder from(Object service, String methodName) {
190-
return IntegrationFlows.from(service, methodName);
191-
}
192-
193-
/**
194-
*
195-
* @param service service for polling method
196-
* @param methodName method to poll
197-
* @param endpointConfigurer configurer for {@link SourcePollingChannelAdapterSpec}
198-
* @return the IntegrationFlowBuilder
199-
* @deprecated since 5.2 in favor of method reference via {@link #from(Supplier)}
200-
*/
201-
@Deprecated
202-
protected IntegrationFlowBuilder from(Object service, String methodName,
203-
Consumer<SourcePollingChannelAdapterSpec> endpointConfigurer) {
204-
205-
return IntegrationFlows.from(service, methodName, endpointConfigurer);
206-
}
207-
208182
protected <T> IntegrationFlowBuilder from(Supplier<T> messageSource) {
209183
return IntegrationFlows.from(messageSource);
210184
}
@@ -219,18 +193,6 @@ protected IntegrationFlowBuilder from(Class<?> serviceInterface) {
219193
return IntegrationFlows.from(serviceInterface);
220194
}
221195

222-
/**
223-
* Start a flow from a proxy for the service interface.
224-
* @param serviceInterface the service interface to proxy for the gateway.
225-
* @param beanName the bean name for the gateway proxy.
226-
* @return the {@link IntegrationFlowBuilder} instance
227-
* @deprecated since 5.2 in favor of {@link #from(Class, Consumer)}
228-
*/
229-
@Deprecated
230-
protected IntegrationFlowBuilder from(Class<?> serviceInterface, @Nullable String beanName) {
231-
return from(serviceInterface, (gateway) -> gateway.beanName(beanName));
232-
}
233-
234196
/**
235197
* Start a flow from a proxy for the service interface.
236198
* @param serviceInterface the service interface class.

0 commit comments

Comments
 (0)