|
该用户从未签到
|
- <!-- 国际化的消息资源文件 -->; t8 N# U* @2 u, M( Y5 ^$ c5 ?, v e/ ?
- <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">4 h! O0 x* V3 s! ?' y0 ~1 u
- <property name="basenames">
1 f; {* K" H. n" C/ u: }# p - <list>
7 }/ g0 \9 j1 N3 { - <!-- 在web环境中一定要定位到classpath 否则默认到当前web应用下找 --># D' ]* v+ |* E* n' t6 T$ O7 v
- <value>classpath:messages</value>
$ j, \. h6 a; I% j5 z4 d, u - </list>. E# e0 P' Z: h5 T& w1 s7 `% x% l
- </property>& _& ~0 B U7 l
- <property name="defaultEncoding" value="UTF-8"/>6 b1 I+ V9 {/ e, ~* o8 o
- <property name="cacheSeconds" value="60"/>5 _4 o# G# N# D
- </bean>
复制代码 此处basenames内一定是 classpath:messages ,如果你写出“messages”,将会到你的web应用的根下找 即你的messages.properties一定在 web应用/messages.propertis。0 D: s# |1 ?& F& Y0 P
|
|