|
|
|
英文的启动日志如下:
203 [main] INFO com.easyjf.web.config.DefaultWebConfig - Loading Configuration File:classpath:/com/easyjf/web/easyjf-web.xml 312 [main] INFO com.easyjf.web.FrameworkLoader - Ineasyjweb.demoView package and load the default Bean! 406 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.user.service.impl.UserServiceImpl-----NameuserService 406 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.user.dao.impl.UserDaoImpl-----NameuserDao 406 [main] INFO com.easyjf.web.FrameworkLoader - Ineasyjweb.demoView package and load the default Bean! 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.user.mvc.UserAction------Path/user 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.mvc.SimpleUserAction------Path/simpleUser 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.mvc.Simple2User2Action------Path/simple2User2 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.mvc.Simple4UserAction------Path/simple4User 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.mvc.Simple1UserAction------Path/simple1User 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.mvc.Simple3UserAction------Path/simple3User 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.hello.mvc.HelloAction------Path/hello 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.user.mvc.LanguageAction------Path/language 422 [main] INFO com.easyjf.web.FrameworkLoader - Automatic load Beaneasyjweb.demo.wizard.RegisterAction------Path/register Started containers initialization ....! 953 [main] INFO com.easyjf.web.FrameworkLoader - EasyJWeb initialized! |
|||||||||||||||||||||||||||||||||||||||
public static String getLocaleMessage(String key) {
return getMessage(key, Globals.LANGUAGE);
}
并在EasyJWeb的配置文件中增加了一个可以改变系统运行语言的配置属性com.easyjweb.language。现在可以直接在配置文件中设置运行属性。如下:
<easyjf-web>
<framework-setting>
<property name="com.easyjweb.debug">false</property><!--调试模式,每次加载都会重新初始化EasyJWeb-->
<property name="com.easyjweb.language">en</property><!--设置服务器默认语言-->
</framework-setting>
</easyjweb>