How to use remote location property file in spring re loadable message resource in java -
i have distributed system 8 app servers running tomcat on it. spring application. want use property file located on others server tomcat read there only. using reloadableresourcebundlemessagesource use auto refreshing feature. bean definition
<bean id="messagesource" class="org.springframework.context.support.reloadableresourcebundlemessagesource"> <property name="basenames" > <list> <value>file:///192.168.1.10//var/ratelimit</value> </list> </property> <property name="cacheseconds" value="60"></property> </bean>
and calling property this
system.out.println(messagesource.getmessage("testprop", null, null));
i not load file using ip address.
could please me on this.
this use read external properties file on http:
<bean id="messagesource" class="org.springframework.context.support.reloadableresourcebundlemessagesource"> <property name="basenames" value="/web-inf/messages,http://our.server.org/ws/i18n"/> <property name="cacheseconds" value="300"/> <property name="usecodeasdefaultmessage" value="true"/> </bean>
maybe enclosing file uri inside value
quoted string may help?
Comments
Post a Comment