changed MethodInvoking Soure and Targt to take a string via a a property methodName (fix for INT-272)
This commit is contained in:
@@ -49,7 +49,7 @@ public class MethodInvokingAdapterParser extends AbstractSingleBeanDefinitionPar
|
||||
throw new ConfigurationException("The 'method' attribute is required.");
|
||||
}
|
||||
builder.addPropertyReference("object", ref);
|
||||
builder.addPropertyValue("method", method);
|
||||
builder.addPropertyValue("methodName", method);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SourceAnnotationPostProcessor extends AbstractAnnotationMethodPostP
|
||||
protected MessageSource<?> processMethod(Object bean, Method method, Annotation annotation) {
|
||||
MethodInvokingSource source = new MethodInvokingSource();
|
||||
source.setObject(bean);
|
||||
source.setMethod(method.getName());
|
||||
source.setMethodName(method.getName());
|
||||
return source;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MethodInvokingSource implements MessageSource<Object>, Initializing
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
public void setMethodName(String method) {
|
||||
Assert.notNull(method, "'method' must not be null");
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.integration.ConfigurationException;
|
||||
|
||||
Reference in New Issue
Block a user