Search in sources :

Example 1 with UseSpelInvoker

use of org.springframework.integration.annotation.UseSpelInvoker in project spring-integration by spring-projects.

the class MessagingMethodInvokerHelper method checkSpelInvokerRequired.

private void checkSpelInvokerRequired(final Class<?> targetClass, Method methodArg, HandlerMethod handlerMethod) {
    Method method = AopUtils.getMostSpecificMethod(methodArg, targetClass);
    UseSpelInvoker useSpel = AnnotationUtils.findAnnotation(method, UseSpelInvoker.class);
    if (useSpel == null) {
        useSpel = AnnotationUtils.findAnnotation(targetClass, UseSpelInvoker.class);
    }
    if (useSpel != null) {
        handlerMethod.spelOnly = true;
        handlerMethod.useSpelInvoker = useSpel;
    }
}
Also used : UseSpelInvoker(org.springframework.integration.annotation.UseSpelInvoker) Method(java.lang.reflect.Method) InvocableHandlerMethod(org.springframework.messaging.handler.invocation.InvocableHandlerMethod)

Aggregations

Method (java.lang.reflect.Method)1 UseSpelInvoker (org.springframework.integration.annotation.UseSpelInvoker)1 InvocableHandlerMethod (org.springframework.messaging.handler.invocation.InvocableHandlerMethod)1