我在 WEB-INF/i18n 目录下有两个文件:
- 应用程序属性
- 消息属性
我已经正确配置了我的 ReloadableResourceBundleMessageSource bean,如下所示(spring mvc):
<bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource" p:basenames="WEB-INF/i18n/messages,WEB-INF/i18n/application"
p:fallbackToSystemLocale="false"/>
然而我从 Spring mvc 得到这个:
2012-09-03 02:59:45,911 [http-bio-8080-exec-4] DEBUG org.springframework.context.support.ReloadableResourceBundleMessageSource - Loading properties [application.properties]
2012-09-03 02:59:45,912 [http-bio-8080-exec-4] DEBUG org.springframework.context.support.ReloadableResourceBundleMessageSource - No properties file found for [WEB-INF/i18n/application_fr] - neither plain properties nor XML
2012-09-03 02:59:45,912 [http-bio-8080-exec-4] DEBUG org.springframework.context.support.ReloadableResourceBundleMessageSource - Loading properties [messages.properties]
2012-09-03 02:59:45,912 [http-bio-8080-exec-4] DEBUG org.springframework.context.support.ReloadableResourceBundleMessageSource - No properties file found for [WEB-INF/i18n/messages_fr] - neither plain properties nor XML
有人可以请教吗?我可以将属性文件移动到类路径并相应地更改我的配置,但我宁愿了解发生了什么。