Example usage for org.springframework.beans.factory.annotation RequiredAnnotationBeanPostProcessor RequiredAnnotationBeanPostProcessor

List of usage examples for org.springframework.beans.factory.annotation RequiredAnnotationBeanPostProcessor RequiredAnnotationBeanPostProcessor

Introduction

In this page you can find the example usage for org.springframework.beans.factory.annotation RequiredAnnotationBeanPostProcessor RequiredAnnotationBeanPostProcessor.

Prototype

RequiredAnnotationBeanPostProcessor

Source Link

Usage

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());
}