Package org.springframework.web.bind.annotation

Examples of org.springframework.web.bind.annotation.ControllerAdvice


    this.beanFactory = beanFactory;

    Class<?> beanType = this.beanFactory.getType(beanName);
    this.order = initOrderFromBeanType(beanType);

    ControllerAdvice annotation = AnnotationUtils.findAnnotation(beanType,ControllerAdvice.class);
    Assert.notNull(annotation, "BeanType [" + beanType.getName() + "] is not annotated @ControllerAdvice");

    this.basePackages.addAll(initBasePackagesFromBeanType(beanType, annotation));
    this.annotations.addAll(Arrays.asList(annotation.annotations()));
    this.assignableTypes.addAll(Arrays.asList(annotation.assignableTypes()));
  }
View Full Code Here


    Assert.notNull(bean, "Bean must not be null");
    this.bean = bean;
    this.order = initOrderFromBean(bean);

    Class<?> beanType = bean.getClass();
    ControllerAdvice annotation = AnnotationUtils.findAnnotation(beanType,ControllerAdvice.class);
    Assert.notNull(annotation, "Bean type [" + beanType.getName() + "] is not annotated @ControllerAdvice");

    this.basePackages.addAll(initBasePackagesFromBeanType(beanType, annotation));
    this.annotations.addAll(Arrays.asList(annotation.annotations()));
    this.assignableTypes.addAll(Arrays.asList(annotation.assignableTypes()));
    this.beanFactory = null;
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.annotation.ControllerAdvice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.