I configures my appstrings.properties file which contains strings related to theme used by my application. There are two themes for my application. Both have their own appstrings.properties file located at WEB-INF/strings/theme1/appstrings and WEB-INF/strings/theme2/appstrings. I specified property themeName in config.properties file.
Here is my spring config file:
<context:property-placeholder location="file:///${config.properties}" />
...
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource"
p:basenames="WEB-INF/strings/theme1/appstrings" />
Right now all my app strings are coming from WEB-INF/strings/theme1/appstrings.properties file. How can I make it dynamic. i.e. when I change themeName propperty to theme2 it should get string from WEB-INF/strings/theme2/appstrings.properties
If config.properties contains a property say: themeName = propertyValue. If you want to use this themeName’s value in spring mvc configuration servlet xml file then you can use ${themeName}
reference