Class StandardBeanInfoFactory

All Implemented Interfaces:
BeanInfoFactory, Ordered
Direct Known Subclasses:

public class StandardBeanInfoFactory extends Object implements BeanInfoFactory, Ordered
BeanInfoFactory implementation that performs standard Introspector inspection.

To be configured via a META-INF/spring.factories file with the following content: org.springframework.beans.BeanInfoFactory=org.springframework.beans.StandardBeanInfoFactory

Ordered at Ordered.LOWEST_PRECEDENCE to allow other user-defined BeanInfoFactory types to take precedence.

Juergen Hoeller
See Also:
  • Field Details


      public static final String IGNORE_BEANINFO_PROPERTY_NAME
      System property that instructs Spring to use the Introspector.IGNORE_ALL_BEANINFO mode when calling the JavaBeans Introspector: "spring.beaninfo.ignore", with a value of "true" skipping the search for BeanInfo classes (typically for scenarios where no such classes are being defined for beans in the application in the first place).

      The default is "false", considering all BeanInfo metadata classes, like for standard Introspector.getBeanInfo(Class) calls. Consider switching this flag to "true" if you experience repeated ClassLoader access for non-existing BeanInfo classes, in case such access is expensive on startup or on lazy loading.

      Note that such an effect may also indicate a scenario where caching doesn't work effectively: Prefer an arrangement where the Spring jars live in the same ClassLoader as the application classes, which allows for clean caching along with the application's lifecycle in any case. For a web application, consider declaring a local IntrospectorCleanupListener in web.xml in case of a multi-ClassLoader layout, which will allow for effective caching as well.

      See Also:
  • Constructor Details

    • StandardBeanInfoFactory

      public StandardBeanInfoFactory()
  • Method Details

    • getBeanInfo

      @NonNull public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException
      Description copied from interface: BeanInfoFactory
      Return the bean info for the given class, if supported.
      Specified by:
      getBeanInfo in interface BeanInfoFactory
      beanClass - the bean class
      the BeanInfo, or null if the given class is not supported
      IntrospectionException - in case of exceptions
    • getOrder

      public int getOrder()
      Description copied from interface: Ordered
      Get the order value of this object.

      Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

      Same order values will result in arbitrary sort positions for the affected objects.

      Specified by:
      getOrder in interface Ordered
      the order value
      See Also: