I am using the ClasspathXmlAppContext.
The ${} syntax if for the PropertyPlaceHolderConfigurer.
I am using the ClasspathXmlAppContext.
The ${} syntax if for the PropertyPlaceHolderConfigurer.
Kees de Kooter
www.boplicity.net
Thanks Andreas,
I start the app with -jar, from the folder the jar is in.
Kees de Kooter
www.boplicity.net
Did some more digging. I created a bare bones app with the following config:
I would expect some error when the properties file is not found. But I see no error message at all. So apparently the override configurer is just not working.Code:<bean id="propertyOverrideConfigurer" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer"> <property name="location" value="file:deploy.properties"/> <property name="ignoreResourceNotFound" value="false"/> <property name="ignoreInvalidKeys" value="false"/> </bean> <bean id="bean" class="Bean"> <property name="property" value="original" /> </bean>
Then I read the spring reference guid once more on the subject:
And that was exactly my problemJust as in the case of BeanPostProcessors, you typically don't want to have
BeanFactoryPostProcessors marked as being lazily-initialized.My app context has the property default-lazy-init="true".
After defining the configurer as lazy-init="false" everything worked as expected.
Last edited by Kees de Kooter; Jul 17th, 2006 at 05:06 AM.
Kees de Kooter
www.boplicity.net
My apologies - I misread PropertyOverrideConfigurer as PropertyPlaceHolderConfigurer.Originally Posted by Kees de Kooter
If you didn't learn anything today, you weren't paying attention!