Remove dead code
* removed registerStandardBeanFactoryPostProcessors() methods * removed commented-out test from PropertyResourceConfigurerTests
This commit is contained in:
@@ -800,39 +800,6 @@ public final class PropertyResourceConfigurerTests {
|
||||
Preferences.systemRoot().node("mySystemPath/mypath").remove("myName");
|
||||
}
|
||||
|
||||
/* TODO SPR-7508: uncomment after PropertySourcesPlaceholderConfigurer implementation
|
||||
@Test
|
||||
public void testPreferencesPlaceholderConfigurerWithCustomPropertiesInEnvironment() {
|
||||
factory.registerBeanDefinition("tb",
|
||||
genericBeanDefinition(TestBean.class)
|
||||
.addPropertyValue("name", "${mypath/myName}")
|
||||
.addPropertyValue("age", "${myAge}")
|
||||
.addPropertyValue("touchy", "${myotherpath/myTouchy}")
|
||||
.getBeanDefinition());
|
||||
|
||||
Properties props = new Properties();
|
||||
props.put("myAge", "99");
|
||||
factory.getEnvironment().getPropertySources().add(new PropertiesPropertySource("localProps", props));
|
||||
|
||||
PreferencesPlaceholderConfigurer ppc = new PreferencesPlaceholderConfigurer();
|
||||
ppc.setSystemTreePath("mySystemPath");
|
||||
ppc.setUserTreePath("myUserPath");
|
||||
Preferences.systemRoot().node("mySystemPath").node("mypath").put("myName", "myNameValue");
|
||||
Preferences.systemRoot().node("mySystemPath/myotherpath").put("myTouchy", "myTouchyValue");
|
||||
Preferences.userRoot().node("myUserPath/myotherpath").put("myTouchy", "myOtherTouchyValue");
|
||||
ppc.afterPropertiesSet();
|
||||
ppc.postProcessBeanFactory(factory);
|
||||
|
||||
TestBean tb = (TestBean) factory.getBean("tb");
|
||||
assertEquals("myNameValue", tb.getName());
|
||||
assertEquals(99, tb.getAge());
|
||||
assertEquals("myOtherTouchyValue", tb.getTouchy());
|
||||
Preferences.userRoot().node("myUserPath/myotherpath").remove("myTouchy");
|
||||
Preferences.systemRoot().node("mySystemPath/myotherpath").remove("myTouchy");
|
||||
Preferences.systemRoot().node("mySystemPath/mypath").remove("myName");
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
private static class ConvertingOverrideConfigurer extends PropertyOverrideConfigurer {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user