Reputation: 558
I am trying to learn Externalizing strings in Spring 4.0.6 RELEASE. In my beans configuration, I have following configuration for message resource.
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"
p:basename="classpath:messages" />
My message resource is under main/src/resources/messages.properties in classpath.
The above configuration works fine, but when I use the full name "messages.properties" in the configuration (p:basename="classpath:messages.properties") , then loading the message resource fails!
Anyone has a clue why is it like this?
Upvotes: 0
Views: 95
Reputation: 4074
As stated in Spring's documentation:
Set a single basename, following the basic ResourceBundle convention of not specifying file extension or language codes
Upvotes: 1