Details
Description
MessagingMethodInvokerHelper.getTargetClass() returns the Proxy when it is a proxy for a <gateway/>. This is because the gateway proxy has no targetClass and AopUtils.getTargetClass() returns the Proxy in that case.
We should either suppress the log message in this case, or, if possible, use the advised class's interface to get the candidate method list.
[org.springframework.integration.util.MessagingMethodInvokerHelper] Method [public final void $Proxy5.addAdvice(int,org.aopalliance.aop.Advice) throws org.springframework.aop.framework.AopConfigException] is not eligible for Message handling. java.lang.IllegalArgumentException: Found more than one parameter type candidate: [int] and [org.aopalliance.aop.Advice] at org.springframework.util.Assert.isNull(Assert.java:89) at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.setExclusiveTargetParameterType(MessagingMethodInvokerHelper.java:624) at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.generateExpression(MessagingMethodInvokerHelper.java:558) at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.<init>(MessagingMethodInvokerHelper.java:440) at org.springframework.integration.util.MessagingMethodInvokerHelper$1.doWith(MessagingMethodInvokerHelper.java:302) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473)