Search in sources :

Example 1 with ContextAnnotationAutowireCandidateResolver

use of org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver in project mule by mulesoft.

the class MuleArtifactContext method createBeanFactory.

@Override
protected DefaultListableBeanFactory createBeanFactory() {
    // Copy all postProcessors defined in the defaultMuleConfig so that they get applied to the child container
    DefaultListableBeanFactory beanFactory = new ObjectProviderAwareBeanFactory(getInternalParentBeanFactory());
    beanFactory.setAutowireCandidateResolver(new ContextAnnotationAutowireCandidateResolver());
    beanFactory.setInstantiationStrategy(new LaxInstantiationStrategyWrapper(new CglibSubclassingInstantiationStrategy(), optionalObjectsController));
    return beanFactory;
}
Also used : ContextAnnotationAutowireCandidateResolver(org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver) CglibSubclassingInstantiationStrategy(org.springframework.beans.factory.support.CglibSubclassingInstantiationStrategy) DefaultListableBeanFactory(org.springframework.beans.factory.support.DefaultListableBeanFactory) LaxInstantiationStrategyWrapper(org.mule.runtime.config.internal.util.LaxInstantiationStrategyWrapper)

Aggregations

LaxInstantiationStrategyWrapper (org.mule.runtime.config.internal.util.LaxInstantiationStrategyWrapper)1 CglibSubclassingInstantiationStrategy (org.springframework.beans.factory.support.CglibSubclassingInstantiationStrategy)1 DefaultListableBeanFactory (org.springframework.beans.factory.support.DefaultListableBeanFactory)1 ContextAnnotationAutowireCandidateResolver (org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver)1