Hi,
I am having problem that placeholders in velocity.properties are not being replaced.
in applicationContext.xml:
in some-servlet.xml:Code:<bean id="propertyPlaceholderConfigurer" class="org.spr...PropertyPlaceholderConfigurer"> <property name="location"><value>/WEB-INF/app.properties</value></property> </bean>
/WEB-INF/app.properties:Code:<bean id="velocityConfig"class="org.spr...VelocityConfigurer"> <property name="configLocation"><value>/WEB-INF/velocity.properties</value></property> </bean>
/WEB-INF/velocity.properties:Code:velocity.file.resource.loader.modificationCheckInterval=0
The place holder ${velocity.file.resource.loader.modificationCheckI nterval} was not replaced by 0 (got exception from VelocityConfig trying to convert that ${ve...} string to a number)Code:file.resource.loader.modificationCheckInterval=${velocity.file.resource.loader.modificationCheckInterval}
I have tried a few things without success:
1. move the PropertyPlaceholderConfigurer from applicationContext.xml to some-servlet.xml
2. use a PropertiesFactoryBean instead of setting the configLocation on VelocityConfigurer (same result):
any help ?Code:<bean id="velocityConfig"class="org.spr...VelocityConfigurer"> <property name="velocityProperties"> <bean class="org.spr...PropertiesFactoryBean"> <property name="location">/WEB-INF/velocity.properties</property> </bean> </property> </bean>
thanx.
-cs


Reply With Quote