Remove dead code
* removed registerStandardBeanFactoryPostProcessors() methods * removed commented-out test from PropertyResourceConfigurerTests
This commit is contained in:
parent
431eaf6df8
commit
7f8ede1407
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -667,15 +667,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Common location for subclasses to call and receive registration of standard
|
||||
* {@link BeanFactoryPostProcessor} bean definitions.
|
||||
*
|
||||
* @param registry subclass BeanDefinitionRegistry
|
||||
*/
|
||||
protected void registerStandardBeanFactoryPostProcessors(BeanDefinitionRegistry registry) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate and invoke all registered BeanPostProcessor beans,
|
||||
* respecting explicit order if given.
|
||||
|
|
|
|||
|
|
@ -218,7 +218,6 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl
|
|||
}
|
||||
beanFactory.setParameterNameDiscoverer(new LocalVariableTableParameterNameDiscoverer());
|
||||
beanFactory.setAutowireCandidateResolver(new QualifierAnnotationAutowireCandidateResolver());
|
||||
registerStandardBeanFactoryPostProcessors(beanFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
|
|||
this.beanFactory = new DefaultListableBeanFactory();
|
||||
this.beanFactory.setParameterNameDiscoverer(new LocalVariableTableParameterNameDiscoverer());
|
||||
this.beanFactory.setAutowireCandidateResolver(new QualifierAnnotationAutowireCandidateResolver());
|
||||
registerStandardBeanFactoryPostProcessors(this.beanFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue