为何???前端
因为放在resoures(Maven)下,全部没法前端没法直接获取配置文件信息java
一、经过springmvc配置文件映射国际化配置文件()spring
<mvc:resources mapping="/i18n/messages**" location="classpath:i18n/messages**" />mvc
访问路径:http://ip:port/项目名/i18n/messages_zh_CN.propertiesapp
二、经过springmvc后台获取文件,而后映射到前端(可是前端获取的纯Map对象)spa
Properties properties = null; try { properties = PropertiesLoaderUtils.loadAllProperties("message/messages_zh_CN.properties"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return properties;
访问路径:http://ip:port/项目名/treeCode/getPro .net