Class ControllerAdviceBean

java.lang.Object
org.springframework.web.method.ControllerAdviceBean
All Implemented Interfaces:
Ordered

public class ControllerAdviceBean extends Object implements Ordered
Encapsulates information about an @ControllerAdvice Spring-managed bean without necessarily requiring it to be instantiated. The findAnnotatedBeans(ApplicationContext) method can be used to discover such beans.

This class is internal to Spring Framework and is not meant to be used by applications to manually create @ControllerAdvice beans.

Since:
3.2
Author:
Rossen Stoyanchev, Brian Clozel, Juergen Hoeller, Sam Brannen
  • Constructor Details

    • ControllerAdviceBean

      public ControllerAdviceBean(String beanName, BeanFactory beanFactory, ControllerAdvice controllerAdvice)
      Create a ControllerAdviceBean using the given bean name, BeanFactory, and @ControllerAdvice annotation.
      Parameters:
      beanName - the name of the bean
      beanFactory - a BeanFactory to retrieve the bean type initially and later to resolve the actual bean
      controllerAdvice - the @ControllerAdvice annotation for the bean
      Since:
      5.2
  • Method Details