diff --git a/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java b/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java index f12b19871b..2ab00f1f8d 100644 --- a/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java +++ b/spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java @@ -245,6 +245,16 @@ public class DefaultAmqpHeaderMapper extends AbstractHeaderMapper amqpMessageProperties.setHeader("spring_reply_correlation", replyCorrelation)) + .acceptIfHasText(getHeaderIfAvailable(headers, AmqpHeaders.SPRING_REPLY_TO_STACK, String.class), + replyToStack -> amqpMessageProperties.setHeader("spring_reply_to", replyToStack)); + } + + private void mapJsonHeaders(Map headers, MessageProperties amqpMessageProperties) { Map jsonHeaders = new HashMap(); for (String jsonHeader : JsonHeaders.HEADERS) { @@ -265,12 +275,6 @@ public class DefaultAmqpHeaderMapper extends AbstractHeaderMapper amqpMessageProperties.setHeader("spring_reply_correlation", replyCorrelation)) - .acceptIfHasText(getHeaderIfAvailable(headers, AmqpHeaders.SPRING_REPLY_TO_STACK, String.class), - replyToStack -> amqpMessageProperties.setHeader("spring_reply_to", replyToStack)); } @Override diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractEvaluationContextFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractEvaluationContextFactoryBean.java index c203efc10c..ff45ef133b 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractEvaluationContextFactoryBean.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractEvaluationContextFactoryBean.java @@ -92,52 +92,65 @@ public abstract class AbstractEvaluationContextFactoryBean implements Applicatio protected void initialize(String beanName) { if (this.applicationContext != null) { - ConversionService conversionService = IntegrationUtils.getConversionService(getApplicationContext()); - if (conversionService != null) { - this.typeConverter = new StandardTypeConverter(conversionService); - } - - Map functionFactoryBeanMap = BeanFactoryUtils - .beansOfTypeIncludingAncestors(this.applicationContext, SpelFunctionFactoryBean.class); - for (SpelFunctionFactoryBean spelFunctionFactoryBean : functionFactoryBeanMap.values()) { - if (!getFunctions().containsKey(spelFunctionFactoryBean.getFunctionName())) { - getFunctions().put(spelFunctionFactoryBean.getFunctionName(), spelFunctionFactoryBean.getObject()); - } - } - - try { - SpelPropertyAccessorRegistrar propertyAccessorRegistrar = - this.applicationContext.getBean(SpelPropertyAccessorRegistrar.class); - for (Entry entry : propertyAccessorRegistrar.getPropertyAccessors() - .entrySet()) { - if (!getPropertyAccessors().containsKey(entry.getKey())) { - getPropertyAccessors().put(entry.getKey(), entry.getValue()); - } - } - } - catch (@SuppressWarnings("unused") NoSuchBeanDefinitionException e) { - // There is no 'SpelPropertyAccessorRegistrar' bean in the application context. - } - - ApplicationContext parent = this.applicationContext.getParent(); - - if (parent != null && parent.containsBean(beanName)) { - AbstractEvaluationContextFactoryBean parentFactoryBean = parent.getBean("&" + beanName, getClass()); - - for (Entry entry : parentFactoryBean.getPropertyAccessors().entrySet()) { - if (!getPropertyAccessors().containsKey(entry.getKey())) { - getPropertyAccessors().put(entry.getKey(), entry.getValue()); - } - } - - for (Entry entry : parentFactoryBean.getFunctions().entrySet()) { - if (!getFunctions().containsKey(entry.getKey())) { - getFunctions().put(entry.getKey(), entry.getValue()); - } - } - } + conversionService(); + functions(); + propertyAccessors(); + processParentIfPresent(beanName); } this.initialized = true; } + private void conversionService() { + ConversionService conversionService = IntegrationUtils.getConversionService(getApplicationContext()); + if (conversionService != null) { + this.typeConverter = new StandardTypeConverter(conversionService); + } + } + + private void functions() { + Map functionFactoryBeanMap = BeanFactoryUtils + .beansOfTypeIncludingAncestors(this.applicationContext, SpelFunctionFactoryBean.class); + for (SpelFunctionFactoryBean spelFunctionFactoryBean : functionFactoryBeanMap.values()) { + if (!getFunctions().containsKey(spelFunctionFactoryBean.getFunctionName())) { + getFunctions().put(spelFunctionFactoryBean.getFunctionName(), spelFunctionFactoryBean.getObject()); + } + } + } + + private void propertyAccessors() { + try { + SpelPropertyAccessorRegistrar propertyAccessorRegistrar = + this.applicationContext.getBean(SpelPropertyAccessorRegistrar.class); + for (Entry entry : propertyAccessorRegistrar.getPropertyAccessors() + .entrySet()) { + if (!getPropertyAccessors().containsKey(entry.getKey())) { + getPropertyAccessors().put(entry.getKey(), entry.getValue()); + } + } + } + catch (@SuppressWarnings("unused") NoSuchBeanDefinitionException e) { + // There is no 'SpelPropertyAccessorRegistrar' bean in the application context. + } + } + + private void processParentIfPresent(String beanName) { + ApplicationContext parent = this.applicationContext.getParent(); + + if (parent != null && parent.containsBean(beanName)) { + AbstractEvaluationContextFactoryBean parentFactoryBean = parent.getBean("&" + beanName, getClass()); + + for (Entry entry : parentFactoryBean.getPropertyAccessors().entrySet()) { + if (!getPropertyAccessors().containsKey(entry.getKey())) { + getPropertyAccessors().put(entry.getKey(), entry.getValue()); + } + } + + for (Entry entry : parentFactoryBean.getFunctions().entrySet()) { + if (!getFunctions().containsKey(entry.getKey())) { + getFunctions().put(entry.getKey(), entry.getValue()); + } + } + } + } + } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java index 1366ae4765..5ac7c421a0 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java @@ -215,27 +215,9 @@ public abstract class AbstractSimpleMessageHandlerFactoryBean ((IntegrationObjectSupport) handlerToConfigure).setComponentName(name)) - .acceptIfNotNull(this.channelResolver, - resolver -> ((IntegrationObjectSupport) handlerToConfigure).setChannelResolver(resolver)); - } - if (!CollectionUtils.isEmpty(this.adviceChain)) { - if (actualHandler instanceof AbstractReplyProducingMessageHandler) { - ((AbstractReplyProducingMessageHandler) actualHandler).setAdviceChain(this.adviceChain); - } - else if (this.logger.isDebugEnabled()) { - String name = this.componentName; - if (name == null && actualHandler instanceof NamedComponent) { - name = ((NamedComponent) actualHandler).getBeanName(); - } - this.logger.debug("adviceChain can only be set on an AbstractReplyProducingMessageHandler" - + (name == null ? "" : (", " + name)) + "."); - } - } + final Object handlerToConfigure = actualHandler; // must be final for lambdas + integrationObjectSupport(actualHandler, handlerToConfigure); + adviceChain(actualHandler); JavaUtils.INSTANCE .acceptIfCondition(this.async != null && actualHandler instanceof AbstractMessageProducingHandler, this.async, @@ -244,6 +226,37 @@ public abstract class AbstractSimpleMessageHandlerFactoryBean ((Orderable) this.handler).setOrder(theOrder)); this.initialized = true; } + initializingBean(); + return this.handler; + } + + private void integrationObjectSupport(Object actualHandler, final Object handlerToConfigure) { + if (actualHandler instanceof IntegrationObjectSupport) { + JavaUtils.INSTANCE + .acceptIfNotNull(this.componentName, + name -> ((IntegrationObjectSupport) handlerToConfigure).setComponentName(name)) + .acceptIfNotNull(this.channelResolver, + resolver -> ((IntegrationObjectSupport) handlerToConfigure).setChannelResolver(resolver)); + } + } + + private void adviceChain(Object actualHandler) { + if (!CollectionUtils.isEmpty(this.adviceChain)) { + if (actualHandler instanceof AbstractReplyProducingMessageHandler) { + ((AbstractReplyProducingMessageHandler) actualHandler).setAdviceChain(this.adviceChain); + } + else if (this.logger.isDebugEnabled()) { + String name = this.componentName; + if (name == null && actualHandler instanceof NamedComponent) { + name = ((NamedComponent) actualHandler).getBeanName(); + } + this.logger.debug("adviceChain can only be set on an AbstractReplyProducingMessageHandler" + + (name == null ? "" : (", " + name)) + "."); + } + } + } + + private void initializingBean() { if (this.handler instanceof InitializingBean) { try { ((InitializingBean) this.handler).afterPropertiesSet(); @@ -252,7 +265,6 @@ public abstract class AbstractSimpleMessageHandlerFactoryBean jsonPathClass = null; try { jsonPathClass = ClassUtils.forName("com.jayway.jsonpath.JsonPath", this.classLoader); } - catch (ClassNotFoundException e) { + catch (@SuppressWarnings("unused") ClassNotFoundException e) { logger.debug("The '#jsonPath' SpEL function cannot be registered: " + "there is no jayway json-path.jar on the classpath."); } @@ -374,7 +380,9 @@ class DefaultConfiguringBeanFactoryPostProcessor IntegrationConfigUtils.BASE_PACKAGE + ".json.JsonPathUtils", "evaluate"); } } + } + private void xpath(int registryId) throws LinkageError { String xpathBeanName = "xpath"; if (!this.beanFactory.containsBean(xpathBeanName) && !registriesProcessed.contains(registryId)) { Class xpathClass = null; @@ -382,7 +390,7 @@ class DefaultConfiguringBeanFactoryPostProcessor xpathClass = ClassUtils.forName(IntegrationConfigUtils.BASE_PACKAGE + ".xml.xpath.XPathUtils", this.classLoader); } - catch (ClassNotFoundException e) { + catch (@SuppressWarnings("unused") ClassNotFoundException e) { logger.debug("SpEL function '#xpath' isn't registered: " + "there is no spring-integration-xml.jar on the classpath."); } @@ -392,7 +400,9 @@ class DefaultConfiguringBeanFactoryPostProcessor IntegrationConfigUtils.BASE_PACKAGE + ".xml.xpath.XPathUtils", "evaluate"); } } + } + private void jsonNodeToString(int registryId) { if (!this.beanFactory.containsBean( IntegrationContextUtils.TO_STRING_FRIENDLY_JSON_NODE_TO_STRING_CONVERTER_BEAN_NAME) && !registriesProcessed.contains(registryId) && JacksonPresent.isJackson2Present()) { @@ -406,8 +416,6 @@ class DefaultConfiguringBeanFactoryPostProcessor new RuntimeBeanReference( IntegrationContextUtils.TO_STRING_FRIENDLY_JSON_NODE_TO_STRING_CONVERTER_BEAN_NAME)); } - - registriesProcessed.add(registryId); } /** diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/IdGeneratorConfigurer.java b/spring-integration-core/src/main/java/org/springframework/integration/config/IdGeneratorConfigurer.java index 977cb05ef2..5275cd64db 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/IdGeneratorConfigurer.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/IdGeneratorConfigurer.java @@ -103,29 +103,37 @@ public final class IdGeneratorConfigurer implements ApplicationListener 1 && this.logger.isWarnEnabled()) { - this.logger.warn("Found too many 'IdGenerator' beans (" + idBeans + ") " + - "Will use the existing UUID strategy."); - } - else if (this.logger.isDebugEnabled()) { - this.logger.debug("Unable to locate MessageHeaders.IdGenerator. Will use the existing UUID strategy."); - } + noSuchBean(context); return false; } catch (IllegalStateException e) { // thrown from ReflectionUtils - if (this.logger.isWarnEnabled()) { - this.logger.warn("Unexpected exception occurred while accessing idGenerator of MessageHeaders." + - " Will use the existing UUID strategy.", e); - } + illegalState(e); return false; } return true; } + private void noSuchBean(ApplicationContext context) { + int idBeans = context.getBeansOfType(IdGenerator.class).size(); + if (idBeans > 1 && this.logger.isWarnEnabled()) { + this.logger.warn("Found too many 'IdGenerator' beans (" + idBeans + ") " + + "Will use the existing UUID strategy."); + } + else if (this.logger.isDebugEnabled()) { + this.logger.debug("Unable to locate MessageHeaders.IdGenerator. Will use the existing UUID strategy."); + } + } + + private void illegalState(IllegalStateException e) { + if (this.logger.isWarnEnabled()) { + this.logger.warn("Unexpected exception occurred while accessing idGenerator of MessageHeaders." + + " Will use the existing UUID strategy.", e); + } + } + private void unsetIdGenerator() { try { Field idGeneratorField = ReflectionUtils.findField(MessageHeaders.class, "idGenerator"); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/IdempotentReceiverAutoProxyCreatorInitializer.java b/spring-integration-core/src/main/java/org/springframework/integration/config/IdempotentReceiverAutoProxyCreatorInitializer.java index 6dbdd86780..d9111949e1 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/IdempotentReceiverAutoProxyCreatorInitializer.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/IdempotentReceiverAutoProxyCreatorInitializer.java @@ -76,49 +76,7 @@ public class IdempotentReceiverAutoProxyCreatorInitializer implements Integratio } } else if (beanDefinition instanceof AnnotatedBeanDefinition) { - if (beanDefinition.getSource() instanceof MethodMetadata) { - MethodMetadata beanMethod = (MethodMetadata) beanDefinition.getSource(); - String annotationType = IdempotentReceiver.class.getName(); - if (beanMethod.isAnnotated(annotationType)) { // NOSONAR never null - Object value = beanMethod.getAnnotationAttributes(annotationType).get("value"); // NOSONAR - if (value != null) { - - Class returnType; - if (beanMethod instanceof StandardMethodMetadata) { - returnType = ((StandardMethodMetadata) beanMethod).getIntrospectedMethod() - .getReturnType(); - } - else { - try { - returnType = ClassUtils.forName(beanMethod.getReturnTypeName(), - beanFactory.getBeanClassLoader()); - } - catch (ClassNotFoundException e) { - throw new CannotLoadBeanClassException(beanDefinition.getDescription(), - beanName, beanMethod.getReturnTypeName(), e); - } - } - - String endpoint = beanName; - if (!MessageHandler.class.isAssignableFrom(returnType)) { - /* - MessageHandler beans, populated from @Bean methods, have a complex id, - including @Configuration bean name, method name and the Messaging annotation name. - The following pattern matches the bean name, regardless of the annotation name. - */ - endpoint = beanDefinition.getFactoryBeanName() + "." + beanName + - ".*" + IntegrationConfigUtils.HANDLER_ALIAS_SUFFIX; - } - - String[] interceptors = (String[]) value; - for (String interceptor : interceptors) { - Map idempotentEndpoint = new ManagedMap(); - idempotentEndpoint.put(interceptor, endpoint); - idempotentEndpointsMapping.add(idempotentEndpoint); - } - } - } - } + annotated(beanFactory, idempotentEndpointsMapping, beanName, beanDefinition); } } @@ -130,4 +88,52 @@ public class IdempotentReceiverAutoProxyCreatorInitializer implements Integratio } } + private void annotated(ConfigurableListableBeanFactory beanFactory, + List> idempotentEndpointsMapping, String beanName, BeanDefinition beanDefinition) + throws LinkageError { + if (beanDefinition.getSource() instanceof MethodMetadata) { + MethodMetadata beanMethod = (MethodMetadata) beanDefinition.getSource(); + String annotationType = IdempotentReceiver.class.getName(); + if (beanMethod.isAnnotated(annotationType)) { // NOSONAR never null + Object value = beanMethod.getAnnotationAttributes(annotationType).get("value"); // NOSONAR + if (value != null) { + + Class returnType; + if (beanMethod instanceof StandardMethodMetadata) { + returnType = ((StandardMethodMetadata) beanMethod).getIntrospectedMethod() + .getReturnType(); + } + else { + try { + returnType = ClassUtils.forName(beanMethod.getReturnTypeName(), + beanFactory.getBeanClassLoader()); + } + catch (ClassNotFoundException e) { + throw new CannotLoadBeanClassException(beanDefinition.getDescription(), + beanName, beanMethod.getReturnTypeName(), e); + } + } + + String endpoint = beanName; + if (!MessageHandler.class.isAssignableFrom(returnType)) { + /* + MessageHandler beans, populated from @Bean methods, have a complex id, + including @Configuration bean name, method name and the Messaging annotation name. + The following pattern matches the bean name, regardless of the annotation name. + */ + endpoint = beanDefinition.getFactoryBeanName() + "." + beanName + + ".*" + IntegrationConfigUtils.HANDLER_ALIAS_SUFFIX; + } + + String[] interceptors = (String[]) value; + for (String interceptor : interceptors) { + Map idempotentEndpoint = new ManagedMap(); + idempotentEndpoint.put(interceptor, endpoint); + idempotentEndpointsMapping.add(idempotentEndpoint); + } + } + } + } + } + } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationComponentScanRegistrar.java b/spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationComponentScanRegistrar.java index 593cf5c131..79b7b5a81b 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationComponentScanRegistrar.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationComponentScanRegistrar.java @@ -111,23 +111,7 @@ public class IntegrationComponentScanRegistrar implements ImportBeanDefinitionRe }; - if ((boolean) componentScan.get("useDefaultFilters")) { // NOSONAR - never null - for (TypeFilter typeFilter : this.componentRegistrars.keySet()) { - scanner.addIncludeFilter(typeFilter); - } - } - - for (AnnotationAttributes filter : (AnnotationAttributes[]) componentScan.get("includeFilters")) { - for (TypeFilter typeFilter : typeFiltersFor(filter, registry)) { - scanner.addIncludeFilter(typeFilter); - } - } - for (AnnotationAttributes filter : (AnnotationAttributes[]) componentScan.get("excludeFilters")) { - for (TypeFilter typeFilter : typeFiltersFor(filter, registry)) { - scanner.addExcludeFilter(typeFilter); - } - } - + filter(registry, componentScan, scanner); // NOSONAR - never null scanner.setResourceLoader(this.resourceLoader); @@ -144,8 +128,30 @@ public class IntegrationComponentScanRegistrar implements ImportBeanDefinitionRe } } + private void filter(BeanDefinitionRegistry registry, Map componentScan, + ClassPathScanningCandidateComponentProvider scanner) { + + if ((boolean) componentScan.get("useDefaultFilters")) { // NOSONAR - never null + for (TypeFilter typeFilter : this.componentRegistrars.keySet()) { + scanner.addIncludeFilter(typeFilter); + } + } + + for (AnnotationAttributes filter : (AnnotationAttributes[]) componentScan.get("includeFilters")) { + for (TypeFilter typeFilter : typeFiltersFor(filter, registry)) { + scanner.addIncludeFilter(typeFilter); + } + } + for (AnnotationAttributes filter : (AnnotationAttributes[]) componentScan.get("excludeFilters")) { + for (TypeFilter typeFilter : typeFiltersFor(filter, registry)) { + scanner.addExcludeFilter(typeFilter); + } + } + } + protected Collection getBasePackages(AnnotationMetadata importingClassMetadata, - BeanDefinitionRegistry registry) { + @SuppressWarnings("unused") BeanDefinitionRegistry registry) { + Map componentScan = importingClassMetadata.getAnnotationAttributes(IntegrationComponentScan.class.getName()); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java b/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java index 1bc7639b9c..ce4388938e 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java @@ -73,7 +73,7 @@ public class MessagingGatewayRegistrar implements ImportBeanDefinitionRegistrar } } - public BeanDefinitionHolder parse(Map gatewayAttributes) { + public BeanDefinitionHolder parse(Map gatewayAttributes) { // NOSONAR complexity String defaultPayloadExpression = (String) gatewayAttributes.get("defaultPayloadExpression"); @SuppressWarnings("unchecked") diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/annotation/AbstractMethodAnnotationPostProcessor.java b/spring-integration-core/src/main/java/org/springframework/integration/config/annotation/AbstractMethodAnnotationPostProcessor.java index 3e22266f16..f51fca354d 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/annotation/AbstractMethodAnnotationPostProcessor.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/annotation/AbstractMethodAnnotationPostProcessor.java @@ -133,7 +133,7 @@ public abstract class AbstractMethodAnnotationPostProcessor adviceChain = extractAdviceChain(beanName, annotations); + orderable(method, handler); + producerOrRouter(annotations, handler); - if (!CollectionUtils.isEmpty(adviceChain) && handler instanceof AbstractReplyProducingMessageHandler) { - ((AbstractReplyProducingMessageHandler) handler).setAdviceChain(adviceChain); + if (handler != sourceHandler) { + String handlerBeanName = generateHandlerBeanName(beanName, method); + if (handler instanceof ReplyProducingMessageHandlerWrapper + && StringUtils.hasText(MessagingAnnotationUtils.endpointIdValue(method))) { + handlerBeanName = handlerBeanName + ".wrapper"; + } + this.beanFactory.registerSingleton(handlerBeanName, handler); + handler = (MessageHandler) this.beanFactory.initializeBean(handler, handlerBeanName); + if (handler instanceof DisposableBean && this.disposables != null) { + this.disposables.add((DisposableBean) handler); + } } + handler = annotated(method, handler); + handler = adviceChain(beanName, annotations, handler); + + AbstractEndpoint endpoint = createEndpoint(handler, method, annotations); + if (endpoint != null) { + return endpoint; + } + else { + return handler; + } + } + + + private void orderable(Method method, MessageHandler handler) { if (handler instanceof Orderable) { Order orderAnnotation = AnnotationUtils.findAnnotation(method, Order.class); if (orderAnnotation != null) { ((Orderable) handler).setOrder(orderAnnotation.value()); } } + } + + + private void producerOrRouter(List annotations, MessageHandler handler) { if (handler instanceof AbstractMessageProducingHandler || handler instanceof AbstractMessageRouter) { String sendTimeout = MessagingAnnotationUtils.resolveAttribute(annotations, "sendTimeout", String.class); if (sendTimeout != null) { @@ -182,22 +210,14 @@ public abstract class AbstractMethodAnnotationPostProcessor annotations, MessageHandler handlerArg) { + MessageHandler handler = handlerArg; + List adviceChain = extractAdviceChain(beanName, annotations); + + if (!CollectionUtils.isEmpty(adviceChain) && handler instanceof AbstractReplyProducingMessageHandler) { + ((AbstractReplyProducingMessageHandler) handler).setAdviceChain(adviceChain); + } if (!CollectionUtils.isEmpty(adviceChain)) { for (Advice advice : adviceChain) { @@ -235,14 +266,7 @@ public abstract class AbstractMethodAnnotationPostProcessor annotations) { + protected AbstractEndpoint createEndpoint(MessageHandler handler, @SuppressWarnings("unused") Method method, + List annotations) { + AbstractEndpoint endpoint = null; String inputChannelName = MessagingAnnotationUtils.resolveAttribute(annotations, getInputChannelAttribute(), String.class); @@ -376,53 +402,8 @@ public abstract class AbstractMethodAnnotationPostProcessor