I want to get the changed key value from properties file at runtime.
test.properties file: name = Hi
I have made Thread sleep with 5 sec and changed the key value as "Hello" but it is not getting changed.
classpath:test.properties
Blockquote
<property name="ignoreResourceNotFound" value="true" />
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>classpath:test</value>
</list>
</property>
<property name="cacheSeconds" value="1" />
</bean>
<bean id="tempBean" name="tempBean1" class="org.sri.spring.temp.Temp"
lazy-init="false" scope="prototype">
<constructor-arg type="String" value="${name}" />
</bean>
Aucun commentaire:
Enregistrer un commentaire