I currently use ReloadableResourceBundleMessageSource from Spring as MessageSource in order to read internationalization messages.
The version of Spring I use is: 4.3.1.RELEASE
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<value>classpath:messages/messages</value>
</list>
</property>
<property name="cacheSeconds" value="1" />
<property name="defaultEncoding" value="UTF-8" />
</bean>
The thing is that I want to use PropertiesConfiguration (from Apache Commons Configuration 2) as a MessageSource. The problem I have is that both extend different classes. I would need to know if Apache Commons Configuration provides a ready-made MessageSource with PropertiesConfiguration or how to make a new MessageSource with this configuration.
The advantage of using this configuration is to have Variable Interpolation that is unavailable in Java's Properties class.
My question is based on this question, but with a twist because I don't use properties directly in my app, but through a message source provided by Spring and I don't want to change that code.