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 theubic.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
-
-
Constructor Summary
Constructors Constructor Description LazyInitByDefaultPostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
void
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
-
-
-
Method Detail
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
- Specified by:
postProcessBeanFactory
in interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor
- Throws:
org.springframework.beans.BeansException
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
-