VIRGIN FOREST OF JAVA
不要埋头苦干,要学习,学习,再学习。。。。。
powered by R.Zeus
 <bean id="messageSource"
          class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename">
            <value>com/suzsoft/jportal/usermanagement/acegi/ApplicationMessages_zh_CN</value>
        </property>
        <property name="alwaysUseMessageFormat" value="true"/>
    </bean>


this from the reference,but the ReloadableResourceBundleMessageSource seems never init and i don't konw how to make it work.

at the last ,I use


  <bean id="messageSource"
          class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename">
            <value>com.suzsoft.jportal.usermanagement.acegi.ApplicationMessages</value>
        </property>
        <property name="alwaysUseMessageFormat" value="true"/>
 </bean>

ResourceBundleMessageSource:

setBasename

public void setBasename(String basename)

Set a single basename, following ResourceBundle conventions: It is a fully-qualified classname. If it doesn't contain a package qualifier (such as org.mypackage), it will be resolved from the classpath root.

Messages will normally be held in the /lib or /classes directory of a WAR. They can also be held in Jars on the class path. For example, a Jar in an application's manifest classpath could contain messages for the application.

ReloadableResourceBundleMessageSource:

setBasename

public void setBasename(String basename)
Set a single basename, following the basic ResourceBundle convention of not specifying file extension or language codes, but in contrast to ResourceBundleMessageSource referring to a Spring resource location: e.g. "WEB-INF/messages" for "WEB-INF/messages.properties", "WEB-INF/messages_en.properties", etc.

As of Spring 1.2.2, XML properties files are also supported: e.g. "WEB-INF/messages" will find and load "WEB-INF/messages.xml", "WEB-INF/messages_en.xml", etc as well. Note that this will only work on JDK 1.5+.


posted on 2006-10-23 20:11 R.Zeus 阅读(3840) 评论(0)  编辑  收藏 所属分类: SPRINGAcegi Security

只有注册用户登录后才能发表评论。


网站导航: