Fix BeanFactory propagation for MMInvokerHelper (#2694)
* Fix BeanFactory propagation for MMInvokerHelper * Remove check for `null` in the `MessagingMethodInvokerHelper.isProvidedMessageHandlerFactoryBean()` * Fix `RecipientListRouter` for `BeanFactory` propagation to the `Recipient.selector` * Fix tests for `BeanFactory` population and propagation * Add `errorChannel` into the `TestUtils.createTestApplicationContext()` * Fix some Sonar smell, including new reported * * Restore NPE check for the `BeanFactory` in the `MessagingMethodInvokerHelper` to avoid breaking changes in the current point release * Some other polishing and optimizations in the `MessagingMethodInvokerHelper`
This commit is contained in:
committed by
Gary Russell
parent
63684e2012
commit
eed16f02ca
@@ -52,6 +52,8 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public abstract class TestUtils {
|
||||
|
||||
private static final Log LOGGER = LogFactory.getLog(TestUtils.class);
|
||||
|
||||
/**
|
||||
* Obtain a value for the property from the provide object.
|
||||
* Supports nested properties via period delimiter.
|
||||
@@ -114,6 +116,11 @@ public abstract class TestUtils {
|
||||
scheduler.setErrorHandler(errorHandler);
|
||||
registerBean("taskScheduler", scheduler, context);
|
||||
registerBean("integrationConversionService", new DefaultFormattingConversionService(), context);
|
||||
registerBean("errorChannel",
|
||||
(MessageChannel) (message, timeout) -> {
|
||||
LOGGER.error(message);
|
||||
return true;
|
||||
}, context);
|
||||
return context;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user