List of usage examples for org.springframework.beans.factory.annotation RequiredAnnotationBeanPostProcessor RequiredAnnotationBeanPostProcessor
RequiredAnnotationBeanPostProcessor
From source file:net.sourceforge.jabm.spring.BeanFactorySingleton.java
public static void initialiseFactory(Resource resource) { beanFactory = new DefaultListableBeanFactory(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory); reader.loadBeanDefinitions(resource); // Caching must be disabled for // net.sourceforge.jabm.init.RandomVariateSimulationInitialiser beanFactory.setCacheBeanMetadata(false); beanFactory.addBeanPostProcessor(new RequiredAnnotationBeanPostProcessor()); // Register the custom simulation scope beanFactory.registerScope(SimulationScope.ATTRIBUTE_VALUE, SimulationScope.getSingletonInstance()); }