Package ubic.gemma.core.context
Class LazyInitByDefaultPostProcessor
java.lang.Object
ubic.gemma.core.context.LazyInitByDefaultPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.core.Ordered
public class LazyInitByDefaultPostProcessor
extends Object
implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered
Mark beans as lazy-init by default.
Beans annotated with Lazy or annotated with the ubic.gemma.core.context.LazyInitByDefaultPostProcessor.ignore
attribute are excluded.
Beans part of the infrastructure role are excluded.
This is a necessary workaround because Spring 3 does not support lazy-by-default for annotated components.
Spring Boot provides a similar functionality with LazyInitializationBeanFactoryPostProcessor.
- Author:
- poirigui
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
-
Constructor Details
-
LazyInitByDefaultPostProcessor
public LazyInitByDefaultPostProcessor()
-
-
Method Details
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-