Spring: 3.0.0M2
JDK: 1.6
We have had a custom instance of PropertyPlaceholderConfigurer working
since Spring 2.5.4 as follows. This does not seem to work with
Spring 3.0.0M2.
Here is the usage of my property placeholder configurer:Code:package X; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; public class MyConfigurer extends PropertyPlaceholderConfigurer { //... }
MyConfigurer is never invoked; instead, it directly invokesCode:// MyBeans.xml <bean id="propertyConfigurer" class="X.MyConfigurer" init-method="initializeBean" p:searchSystemEnvironment="true" p:systemPropertiesModeName="SYSTEM_PROPERTIES_MODE_FALLBACK" /> <bean id="SomeBean" class="..." p:property="${my.custom.property}" />
org.springframework.beans.factory.config.PropertyP laceholderConfigurer.processProperties,
which fails to evaluate ${my.custom.property}:
Please help! Any suggestions appreciated!Code:org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'my.custom.property' defined in class path resource [MyBeans.xml]: Could not resolve placeholder 'my.custom.property' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:269) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:543) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:518) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:358) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254) //...
/U


Reply With Quote