List of usage examples for org.springframework.beans.factory.config PreferencesPlaceholderConfigurer setLocation
public void setLocation(Resource location)
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 w w w . j a v a2 s . c om }
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();/*w w w. j a va 2s .com*/ }