Example usage for org.springframework.context.support StaticApplicationContext addBeanFactoryPostProcessor

List of usage examples for org.springframework.context.support StaticApplicationContext addBeanFactoryPostProcessor

Introduction

In this page you can find the example usage for org.springframework.context.support StaticApplicationContext addBeanFactoryPostProcessor.

Prototype

@Override
    public void addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor) 

Source Link

Usage

From source file:ome.client.utests.Preferences3Test.java

@Test(groups = "ticket:62")
@ExpectedExceptions(BeanInitializationException.class)
public void test_missingLoadProperties() {
    StaticApplicationContext ac = new StaticApplicationContext();
    PreferencesPlaceholderConfigurer ppc = new PreferencesPlaceholderConfigurer();
    ppc.setLocation(new ClassPathResource("DOES--NOT--EXIST"));

    ac.addBeanFactoryPostProcessor(ppc);
    ac.refresh();//from www  . jav  a 2  s  . co m
}

From source file:ome.client.utests.Preferences3Test.java

@Test(groups = "ticket:62")
public void test_missingLoadPropertiesIgnore() {
    StaticApplicationContext ac = new StaticApplicationContext();
    PreferencesPlaceholderConfigurer ppc = new PreferencesPlaceholderConfigurer();
    ppc.setLocation(new ClassPathResource("DOES--NOT--EXIST"));
    ppc.setIgnoreResourceNotFound(true);

    ac.addBeanFactoryPostProcessor(ppc);
    ac.refresh();/*from  ww  w .j  a  va2 s  . c om*/

}