在/src/main/resources/conf/plugin/plug/conf.properties
中指定国际化文件位置:
messageSource.basenames.plug=classpath:messages/plugin/plug/plug
messageSource.basenames.plugfore=classpath:messages/plugin/plugfore/plugfore
系统中其他的国际化文件在/src/main/resources/conf/conf.properties
文件中指定:
messageSource.basenames.common=classpath:messages/common/common
messageSource.basenames.core=classpath:messages/core/core
messageSource.basenames.corefore=classpath:messages/corefore/corefore
messageSource.basenames.ext=classpath:messages/ext/ext
messageSource.basenames.extfore=classpath:messages/extfore/extfore
这些配置会在/src/main/resources/conf/context.xml
文件中加载:
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="cacheSeconds" value="${messageSource.cacheSeconds}"/>
<property name="basenames" value="#{propertiesHelper.getList('messageSource.basenames.')}"/>
<property name="fallbackToSystemLocale" value="false"/>
<property name="alwaysUseMessageFormat" value="false"/>
<property name="defaultEncoding" value="UTF-8"/>
</bean>