SpringMVC i18n国际化资源文件路径配置
来源:互联网 发布:windows键锁定 编辑:程序博客网 时间:2024/06/12 07:32
1、i18n资源文件在classes根目录下。
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="defaultEncoding" value="UTF-8" /> <property name="useCodeAsDefaultMessage" value="true" /> <property name="basenames"> <list> <value>messages</value> </list> </property> </bean>
2、i18n资源文件在SRC多层目录下,如图:
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="defaultEncoding" value="UTF-8" /> <property name="useCodeAsDefaultMessage" value="true" /> <property name="basenames"> <list> <value>i18n.messages</value> </list> </property> </bean
3、i18N在我们SRC工程目录下,如:
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basenames"> <list> <value>i18n.messages</value> <value>com.xxx.common.i18n.messages</value> </list> </property> <property name="defaultEncoding" value="UTF-8" /> <property name="useCodeAsDefaultMessage" value="true" /> </bean>
2 0
- SpringMVC i18n国际化资源文件路径配置
- springmvc web国际化i18n解决资源文件路径问题
- SpringMvc中配置国际化资源文件
- SpringMvc国际化i18n
- Android I18N 资源国际化
- Spring 读取i18n国际化资源文件的工具类
- webpack i18n国际化配置
- structs 国际化资源文件配置
- 如何配置国际化资源文件
- Struts 国际化 i18n 的配置
- Spring MVC I18N 国际化配置
- SpringMVC国际化(i18n)(五)
- Rails 消息资源的国际化(I18n)
- Struts2_配置包范围国际化资源文件
- struts2配置国际化全局资源文件 并 输出国际化信息
- 配置国际化全局资源文件、输出国际化信息
- struts2-19配置国际化全局资源文件、输出国际化信息
- springMVC项目中配置i18n
- 290. Word Pattern
- Android应用层View绘制流程与源码分析
- 认识<hr>标签,添加水平横线
- Callable、Future和FutureTask
- <address>标签,为网页加入地址信息
- SpringMVC i18n国际化资源文件路径配置
- python中的__doc__,__name__
- 大一下学期我的c++学习方面实践体会
- 暴力枚举算法之谁做的好事
- Linux 文件系统与设备文件系统 (二)—— sysfs 文件系统与Linux设备模型
- 批注:C++设计模式——工厂方法模式:合并
- 学习算法导论过程的汇总
- Timer和TimerTask(转载)
- Java线程面试题 Top 50