该用户从未签到
|
- <!-- 国际化的消息资源文件 --> w( e6 i7 Z- n
- <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">1 ^$ F+ T" B0 u* t; P% X6 h7 m, e5 H
- <property name="basenames"> t) g1 B5 H( e" T
- <list>
" z4 M2 y$ ]& N8 o7 K - <!-- 在web环境中一定要定位到classpath 否则默认到当前web应用下找 -->
5 ? q6 V5 e' t5 H - <value>classpath:messages</value>! m' T- C, ^5 B; e+ y7 U4 J/ d
- </list>5 A+ W1 s: I$ ^0 [2 x
- </property>
% S. T( H/ _. F" q s j/ A - <property name="defaultEncoding" value="UTF-8"/>
' [5 Z& | T3 J - <property name="cacheSeconds" value="60"/>/ e1 J* t% Z# a0 B
- </bean>
复制代码 此处basenames内一定是 classpath:messages ,如果你写出“messages”,将会到你的web应用的根下找 即你的messages.properties一定在 web应用/messages.propertis。' x f* L# Q& @& q& y0 I3 E0 V
|
|