Example usage for org.springframework.integration.util MessagingAnnotationUtils hasValue

List of usage examples for org.springframework.integration.util MessagingAnnotationUtils hasValue

Introduction

In this page you can find the example usage for org.springframework.integration.util MessagingAnnotationUtils hasValue.

Prototype

public static boolean hasValue(Object value) 

Source Link

Usage

From source file:org.springframework.integration.config.annotation.AbstractMethodAnnotationPostProcessor.java

protected void checkMessageHandlerAttributes(String handlerBeanName, List<Annotation> annotations) {
    for (String attribute : this.messageHandlerAttributes) {
        for (Annotation annotation : annotations) {
            Object value = AnnotationUtils.getValue(annotation, attribute);
            if (MessagingAnnotationUtils.hasValue(value)) {
                throw new BeanDefinitionValidationException("The MessageHandler [" + handlerBeanName
                        + "] can not" + " be populated because of ambiguity with annotation attributes "
                        + this.messageHandlerAttributes
                        + " which are not allowed when an integration annotation "
                        + "is used with a @Bean definition for a MessageHandler."
                        + "\nThe attribute causing the ambiguity is: [" + attribute + "]."
                        + "\nUse the appropriate setter on the MessageHandler directly when configuring an "
                        + "endpoint this way.");
            }/*from  w w  w  .j  a v a  2 s  .c  o  m*/
        }
    }
}