diff --git a/build.gradle b/build.gradle index 258c7bf94c..f1abb52203 100644 --- a/build.gradle +++ b/build.gradle @@ -122,7 +122,7 @@ subprojects { subproject -> junitVintageVersion = '5.1.0' jythonVersion = '2.5.3' kryoShadedVersion = '3.0.3' - log4jVersion = '2.10.0' + log4jVersion = '2.11.0' micrometerVersion = '1.0.3' mockitoVersion = '2.11.0' mysqlVersion = '6.0.6' @@ -141,7 +141,7 @@ subprojects { subproject -> springSecurityVersion = '5.1.0.BUILD-SNAPSHOT' springSocialTwitterVersion = '1.1.2.RELEASE' springRetryVersion = '1.2.2.RELEASE' - springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.5.BUILD-SNAPSHOT' + springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.1.0.BUILD-SNAPSHOT' springWsVersion = '3.0.1.RELEASE' tomcatVersion = "8.5.23" xmlUnitVersion = '1.6' @@ -291,7 +291,6 @@ project('spring-integration-test-support') { compile "org.springframework:spring-messaging:$springVersion" compile "org.springframework:spring-test:$springVersion" compile ("org.apache.logging.log4j:log4j-core:$log4jVersion" , optional) - compile ('log4j:log4j:1.2.17', optional) } } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/GlobalChannelInterceptorProcessor.java b/spring-integration-core/src/main/java/org/springframework/integration/config/GlobalChannelInterceptorProcessor.java index 321672f1e2..9c38a7b055 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/GlobalChannelInterceptorProcessor.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/GlobalChannelInterceptorProcessor.java @@ -23,7 +23,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Properties; import java.util.Set; import org.apache.commons.logging.Log; @@ -39,8 +38,6 @@ import org.springframework.core.OrderComparator; import org.springframework.integration.channel.ChannelInterceptorAware; import org.springframework.integration.channel.interceptor.GlobalChannelInterceptorWrapper; import org.springframework.integration.channel.interceptor.VetoCapableInterceptor; -import org.springframework.integration.context.IntegrationContextUtils; -import org.springframework.integration.context.IntegrationProperties; import org.springframework.integration.support.utils.PatternMatchUtils; import org.springframework.messaging.support.ChannelInterceptor; import org.springframework.util.Assert; @@ -105,12 +102,7 @@ public final class GlobalChannelInterceptorProcessor } } - // TODO Remove this logic in 5.1 - Properties integrationProperties = IntegrationContextUtils.getIntegrationProperties(this.beanFactory); - - this.singletonsInstantiated = - Boolean.parseBoolean(integrationProperties.getProperty( - IntegrationProperties.POST_PROCESS_DYNAMIC_BEANS)); + this.singletonsInstantiated = true; } @Override diff --git a/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationProperties.java b/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationProperties.java index a18208aabb..43e263a186 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationProperties.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationProperties.java @@ -77,13 +77,6 @@ public final class IntegrationProperties { */ public static final String ENDPOINTS_NO_AUTO_STARTUP = INTEGRATION_PROPERTIES_PREFIX + "endpoints.noAutoStartup"; - /** - * Whether {@link org.springframework.beans.factory.config.BeanPostProcessor}s should process beans registered at runtime. - * Will be removed in 5.1. - */ - public static final String POST_PROCESS_DYNAMIC_BEANS = INTEGRATION_PROPERTIES_PREFIX + "postProcessDynamicBeans"; - - private static Properties defaults; static { diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/AbstractDispatcher.java b/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/AbstractDispatcher.java index 51a516ac6f..81476c7227 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/AbstractDispatcher.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/AbstractDispatcher.java @@ -21,10 +21,9 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.integration.support.utils.IntegrationUtils; import org.springframework.messaging.Message; -import org.springframework.messaging.MessageDeliveryException; import org.springframework.messaging.MessageHandler; -import org.springframework.messaging.MessagingException; import org.springframework.util.Assert; /** @@ -117,41 +116,13 @@ public abstract class AbstractDispatcher implements MessageDispatcher { return true; } catch (Exception e) { - throw wrapExceptionIfNecessary(message, e); + throw IntegrationUtils.wrapInDeliveryExceptionIfNecessary(message, + () -> "Dispatcher failed to deliver Message", e); } } return false; } - /** - * If the exception is not a {@link MessagingException} or does not have a - * {@link MessagingException#getFailedMessage() failedMessage}, wrap it in a new - * {@link MessagingException} with the message. There is some inconsistency here in - * that {@link MessagingException}s are wrapped in a {@link MessagingException} whereas - * {@link Exception}s are wrapped in {@link MessageDeliveryException}. It is retained - * for backwards compatibility and will be resolved in 5.1. - * It also does not wrap other {@link RuntimeException}s. - * TODO: Remove this in favor of - * {@code #wrapInDeliveryExceptionIfNecessary(Message, Supplier, Exception)} in 5.1. - * @param message the message. - * @param e the exception. - * @return the wrapper, if necessary, or the original exception. - * @deprecated in favor of - * {@code IntegrationUtils#wrapInDeliveryExceptionIfNecessary(Message, Supplier, Exception)} - */ - @Deprecated - protected RuntimeException wrapExceptionIfNecessary(Message message, Exception e) { - RuntimeException runtimeException = (e instanceof RuntimeException) - ? (RuntimeException) e - : new MessageDeliveryException(message, - "Dispatcher failed to deliver Message.", e); - if (e instanceof MessagingException && - ((MessagingException) e).getFailedMessage() == null) { - runtimeException = new MessagingException(message, "Dispatcher failed to deliver Message", e); - } - return runtimeException; - } - @Override public String toString() { return this.getClass().getSimpleName() + " with handlers: " + this.handlers.toString(); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/UnicastingDispatcher.java b/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/UnicastingDispatcher.java index 4c04ad5650..1908eda247 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/UnicastingDispatcher.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dispatcher/UnicastingDispatcher.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.concurrent.Executor; import org.springframework.integration.MessageDispatchingException; +import org.springframework.integration.support.utils.IntegrationUtils; import org.springframework.messaging.Message; import org.springframework.messaging.MessageDeliveryException; import org.springframework.messaging.MessageHandler; @@ -145,8 +146,8 @@ public class UnicastingDispatcher extends AbstractDispatcher { success = true; // we have a winner. } catch (Exception e) { - @SuppressWarnings("deprecation") - RuntimeException runtimeException = wrapExceptionIfNecessary(message, e); + RuntimeException runtimeException = IntegrationUtils.wrapInDeliveryExceptionIfNecessary(message, + () -> "Dispatcher failed to deliver Message", e); exceptions.add(runtimeException); this.handleExceptions(exceptions, message, !handlerIterator.hasNext()); } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/endpoint/PollingConsumer.java b/spring-integration-core/src/main/java/org/springframework/integration/endpoint/PollingConsumer.java index d6edbdce4e..3ca5e8b62d 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/endpoint/PollingConsumer.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/endpoint/PollingConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -135,14 +135,12 @@ public class PollingConsumer extends AbstractPollingEndpoint implements Integrat if (!CollectionUtils.isEmpty(interceptorStack)) { triggerAfterMessageHandled(theMessage, ex, interceptorStack); } - // TODO: In 5.1 remove this; adding the failed message to the text is redundant - final Message messageForText = theMessage; throw IntegrationUtils.wrapInDeliveryExceptionIfNecessary(theMessage, - () -> "Failed to handle " + messageForText + " to " + this + " in " + this.handler, ex); + () -> "Failed to handle message to " + this + " in " + this.handler, ex); } catch (Error ex) { //NOSONAR - ok, we re-throw below if (!CollectionUtils.isEmpty(interceptorStack)) { - String description = "Failed to handle " + theMessage + " to " + this + " in " + this.handler; + String description = "Failed to handle message to " + this + " in " + this.handler; triggerAfterMessageHandled(theMessage, new MessageDeliveryException(theMessage, description, ex), interceptorStack); diff --git a/spring-integration-core/src/main/resources/META-INF/spring.integration.default.properties b/spring-integration-core/src/main/resources/META-INF/spring.integration.default.properties index b609b6d95e..afdae85c7f 100644 --- a/spring-integration-core/src/main/resources/META-INF/spring.integration.default.properties +++ b/spring-integration-core/src/main/resources/META-INF/spring.integration.default.properties @@ -6,4 +6,3 @@ spring.integration.messagingTemplate.throwExceptionOnLateReply=false # Defaults to MessageHeaders.ID and MessageHeaders.TIMESTAMP spring.integration.readOnly.headers= spring.integration.endpoints.noAutoStartup= -spring.integration.postProcessDynamicBeans=false diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/InterceptedSharedConnectionTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/InterceptedSharedConnectionTests.java index 1d2ed7a56d..004f4ba9ea 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/InterceptedSharedConnectionTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/InterceptedSharedConnectionTests.java @@ -22,10 +22,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.junit.AfterClass; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -67,20 +63,6 @@ public class InterceptedSharedConnectionTests { @Autowired Listener listener; - private static Level existingLogLevel; - - // temporary hooks to investigate CI failures - @BeforeClass - public static void setup() { - existingLogLevel = LogManager.getLogger("org.springframework.integration").getLevel(); - LogManager.getLogger("org.springframework.integration").setLevel(Level.DEBUG); - } - - @AfterClass - public static void tearDown() { - LogManager.getLogger("org.springframework.integration").setLevel(existingLogLevel); - } - /** * Tests a loopback. The client-side outbound adapter sends a message over * a connection from the client connection factory; the server side diff --git a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/StoredProcExecutorTests.java b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/StoredProcExecutorTests.java index 86d4b4cfb3..456b4851fe 100644 --- a/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/StoredProcExecutorTests.java +++ b/spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/StoredProcExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -27,7 +27,8 @@ import java.util.Map; import javax.sql.DataSource; -import org.apache.log4j.Logger; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.junit.Test; import org.springframework.beans.DirectFieldAccessor; @@ -52,7 +53,7 @@ import com.google.common.cache.CacheStats; */ public class StoredProcExecutorTests { - private static final Logger LOGGER = Logger.getLogger(StoredProcExecutorTests.class); + private static final Log LOGGER = LogFactory.getLog(StoredProcExecutorTests.class); @Test public void testStoredProcExecutorWithNullDataSource() { diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java index f6e6d394f5..f69f766ea1 100644 --- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java +++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineJmsTests.java @@ -26,10 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; import org.junit.After; -import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -54,11 +51,6 @@ public class PipelineJmsTests extends ActiveMQMultiContextTests { @Rule public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest(); - @Before - public void setLogLevel() { - LogManager.getLogger(getClass()).setLevel(Level.INFO); - } - @After public void tearDown() { this.executor.shutdownNow(); diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineNamedReplyQueuesJmsTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineNamedReplyQueuesJmsTests.java index 9a661b57ea..8cddba8ea5 100644 --- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineNamedReplyQueuesJmsTests.java +++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/request_reply/PipelineNamedReplyQueuesJmsTests.java @@ -29,10 +29,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; import org.junit.After; -import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -59,11 +56,6 @@ public class PipelineNamedReplyQueuesJmsTests extends ActiveMQMultiContextTests @Rule public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest(); - @Before - public void setLogLevel() { - LogManager.getLogger(getClass()).setLevel(Level.INFO); - } - @After public void tearDown() { this.executor.shutdownNow(); diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/IdempotentReceiverIntegrationTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/IdempotentReceiverIntegrationTests.java index 4c1f9edae6..33b04ac5f1 100644 --- a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/IdempotentReceiverIntegrationTests.java +++ b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/IdempotentReceiverIntegrationTests.java @@ -250,7 +250,7 @@ public class IdempotentReceiverIntegrationTests { @Bean public HazelcastInstance hazelcastInstance() { - return Hazelcast.newHazelcastInstance(new Config().setProperty("hazelcast.logging.type", "log4j")); + return Hazelcast.newHazelcastInstance(new Config().setProperty("hazelcast.logging.type", "slf4j")); } diff --git a/spring-integration-test-support/src/main/java/org/springframework/integration/test/rule/Log4jLevelAdjuster.java b/spring-integration-test-support/src/main/java/org/springframework/integration/test/rule/Log4jLevelAdjuster.java deleted file mode 100644 index 11c30ed8a4..0000000000 --- a/spring-integration-test-support/src/main/java/org/springframework/integration/test/rule/Log4jLevelAdjuster.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2015-2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.test.rule; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.Map; -import java.util.Set; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.junit.rules.MethodRule; -import org.junit.runners.model.FrameworkMethod; -import org.junit.runners.model.Statement; - -/** - * A JUnit method @Rule that changes the logger level for a set of classes - * or packages - * while a test method is running. Useful for performance or scalability tests - * where we don't want to generate a large log in a tight inner loop, or - * enabling debug logging for a test case. - * - * @author Dave Syer - * @author Gary Russell - * - * @deprecated since 5.0.1 in favor of {@link Log4j2LevelAdjuster}. - * Will be removed in 5.1. - * - */ -@Deprecated -@SuppressWarnings("deprecation") -public class Log4jLevelAdjuster implements MethodRule { - - private static final Log logger = - LogFactory.getLog(org.springframework.integration.test.rule.Log4jLevelAdjuster.class); - - private final Class[] classes; - - private final Level level; - - private final String[] categories; - - public Log4jLevelAdjuster(Level level, Class... classes) { - this.level = level; - this.classes = classes; - this.categories = new String[0]; - } - - public Log4jLevelAdjuster(Level level, String... categories) { - this.level = level; - this.classes = new Class[0]; - Set cats = new LinkedHashSet(Arrays.asList(categories)); - cats.add(getClass().getPackage().getName()); - this.categories = new ArrayList(cats).toArray(new String[cats.size()]); - } - - @Override - public Statement apply(final Statement base, final FrameworkMethod method, Object target) { - return new Statement() { - @Override - public void evaluate() throws Throwable { - Map, Level> oldLevels = new HashMap, Level>(); - for (Class cls : classes) { - oldLevels.put(cls, LogManager.getLogger(cls).getEffectiveLevel()); - LogManager.getLogger(cls).setLevel(level); - } - Map oldCatLevels = new HashMap(); - for (String category : categories) { - oldCatLevels.put(category, LogManager.getLogger(category).getEffectiveLevel()); - LogManager.getLogger(category).setLevel(level); - } - logger.debug("++++++++++++++++++++++++++++ " - + "Overridden log level setting for: " + Arrays.asList(classes) + " and " - + Arrays.asList(categories) + " for test " + method.getName()); - try { - base.evaluate(); - } - finally { - logger.debug("++++++++++++++++++++++++++++ " - + "Restoring log level setting for: " + Arrays.asList(classes) + " and " - + Arrays.asList(categories) + " for test " + method.getName()); - // raw Class type used to avoid http://bugs.sun.com/view_bug.do?bug_id=6682380 - for (@SuppressWarnings("rawtypes") Class cls : classes) { - LogManager.getLogger(cls).setLevel(oldLevels.get(cls)); - } - for (String category : categories) { - LogManager.getLogger(category).setLevel(oldCatLevels.get(category)); - } - } - } - }; - } - -} diff --git a/spring-integration-test-support/src/main/java/org/springframework/integration/test/support/LogAdjustingTestSupport.java b/spring-integration-test-support/src/main/java/org/springframework/integration/test/support/LogAdjustingTestSupport.java deleted file mode 100644 index 9ba749a9cd..0000000000 --- a/spring-integration-test-support/src/main/java/org/springframework/integration/test/support/LogAdjustingTestSupport.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2015-2018 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.test.support; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.apache.log4j.Logger; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.rules.TestName; - -/** - * Base class for module tests where logging is set to TRACE for the duration - * of the test and reverted to the previous value. Also logs a start/end - * message. Duplicated in s-i-core/src/test for use there, to avoid circular dep. - * - * @author Artem Bilan - * @author Gary Russell - * - * @since 4.2.2 - * - * @deprecated since 5.0.1 in favor of {@link org.springframework.integration.test.rule.Log4j2LevelAdjuster}. - * Will be removed in 5.1. - * - */ -@Deprecated -public class LogAdjustingTestSupport { - - /* - * If you make changes here, consider doing the same in the core version. - */ - - @Rule - public TestName testName = new TestName(); - - protected final Log logger = LogFactory.getLog(this.getClass()); - - private final Collection loggersToAdjust = new ArrayList(); - - private final Collection oldCategories = new ArrayList(); - - - public LogAdjustingTestSupport() { - this("org.springframework.integration"); - } - - public LogAdjustingTestSupport(String... loggersToAdjust) { - for (String loggerToAdjust : loggersToAdjust) { - this.loggersToAdjust.add(LogManager.getLogger(loggerToAdjust)); - } - } - - @Before - public void beforeTest() { - for (Logger loggerToAdjust : this.loggersToAdjust) { - this.oldCategories.add(loggerToAdjust.getEffectiveLevel()); - loggerToAdjust.setLevel(Level.TRACE); - } - this.logger.warn("!!!! Starting test: " + this.testName.getMethodName() + " !!!!"); - } - - @After - public void afterTest() { - logger.warn("!!!! Finished test: " + this.testName.getMethodName() + " !!!!"); - Iterator oldCategory = this.oldCategories.iterator(); - for (Logger loggerToAdjust : this.loggersToAdjust) { - loggerToAdjust.setLevel(oldCategory.next()); - } - } - -} diff --git a/spring-integration-webflux/src/main/java/org/springframework/integration/webflux/support/WebFluxContextUtils.java b/spring-integration-webflux/src/main/java/org/springframework/integration/webflux/support/WebFluxContextUtils.java index 7c5c996251..48bd475730 100644 --- a/spring-integration-webflux/src/main/java/org/springframework/integration/webflux/support/WebFluxContextUtils.java +++ b/spring-integration-webflux/src/main/java/org/springframework/integration/webflux/support/WebFluxContextUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2018 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. @@ -16,13 +16,12 @@ package org.springframework.integration.webflux.support; -import org.springframework.integration.http.config.HttpContextUtils; - /** * Utility class for accessing WebFlux integration components * from the {@link org.springframework.beans.factory.BeanFactory}. * * @author Artem Bilan + * @author Gary Russell * * @since 5.0 */ @@ -32,16 +31,6 @@ public final class WebFluxContextUtils { super(); } - /** - * The {@code boolean} flag to indicate if the - * {@code org.springframework.web.reactive.result.method.RequestMappingInfo} - * is present in the CLASSPATH to allow to register the Integration server reactive components. - * @deprecated since 5.0.2 in favor of {@link HttpContextUtils#WEB_FLUX_PRESENT}. - * Will be removed in the 5.1. - */ - @Deprecated - public static final boolean WEB_FLUX_PRESENT = HttpContextUtils.WEB_FLUX_PRESENT; - /** * The name for the infrastructure * {@link org.springframework.integration.webflux.inbound.WebFluxIntegrationRequestMappingHandlerMapping} bean. diff --git a/src/reference/asciidoc/whats-new.adoc b/src/reference/asciidoc/whats-new.adoc index 5cc90c02db..a82943b07b 100644 --- a/src/reference/asciidoc/whats-new.adoc +++ b/src/reference/asciidoc/whats-new.adoc @@ -19,3 +19,17 @@ See <>. ==== Java DSL The `IntegrationFlowContext` is now an interface and `IntegrationFlowRegistration` is an inner interface of the `IntegrationFlowContext`. + +==== Dispatcher Exceptions + +Exceptions caught and re-thrown by `AbstractDispatcher` are now more consistent: + +- A `MessagingException` of any kind, with a `failedMessage` property, is re-thrown unchanged +- All other exceptions are wrapped in a `MessageDeliveryException` with the `failedMessage` property set + +Previously: + +- A `MessagingException` of any kind, with a `failedMessage` property, was re-thrown unchanged +- A `MessagingException`, with no `failedMessage` property, was wrapped in a `MessagingException` with the `failedMessage` property set +- Other `RuntimeException` s were re-thrown unchanged +- Checked exceptions were wrapped in a `MessageDeliveryException` with the `failedMessage` property set