Example usage for org.springframework.context.annotation CommonAnnotationBeanPostProcessor CommonAnnotationBeanPostProcessor

List of usage examples for org.springframework.context.annotation CommonAnnotationBeanPostProcessor CommonAnnotationBeanPostProcessor

Introduction

In this page you can find the example usage for org.springframework.context.annotation CommonAnnotationBeanPostProcessor CommonAnnotationBeanPostProcessor.

Prototype

public CommonAnnotationBeanPostProcessor() 

Source Link

Document

Create a new CommonAnnotationBeanPostProcessor, with the init and destroy annotation types set to javax.annotation.PostConstruct and javax.annotation.PreDestroy , respectively.

Usage

From source file:dirty.mockito.spring.context.TestBeanFactory.java

/**
 *
 *///from   www.  j a  va 2 s .  c om
public TestBeanFactory() {
    final AutowiredAnnotationBeanPostProcessor aabpp = new AutowiredAnnotationBeanPostProcessor();
    aabpp.setBeanFactory(this);
    addBeanPostProcessor(aabpp);

    final CommonAnnotationBeanPostProcessor cabpp = new CommonAnnotationBeanPostProcessor();
    cabpp.setBeanFactory(this);
    addBeanPostProcessor(cabpp);
}

From source file:com.fitbur.testify.examples.junit.spring.systemtest.GreeterWebConfig.java

@Bean
static CommonAnnotationBeanPostProcessor commonAnnotationProcessor() {
    return new CommonAnnotationBeanPostProcessor();
}

From source file:org.springframework.context.annotation.Spr3775InitDestroyLifecycleTests.java

private DefaultListableBeanFactory createBeanFactoryAndRegisterBean(final Class<?> beanClass,
        final String initMethodName, final String destroyMethodName) {
    DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
    RootBeanDefinition beanDefinition = new RootBeanDefinition(beanClass);
    beanDefinition.setInitMethodName(initMethodName);
    beanDefinition.setDestroyMethodName(destroyMethodName);
    beanFactory.addBeanPostProcessor(new CommonAnnotationBeanPostProcessor());
    beanFactory.registerBeanDefinition(LIFECYCLE_TEST_BEAN, beanDefinition);
    return beanFactory;
}