读书人

Websphere中获取项目上.properties路径

发布时间: 2012-08-30 09:55:54 作者: rapoo

Websphere中获取项目下.properties路径

一:如果容器为Websphere,那下面为红色的地方不能加"/",如果为tomcat,则加上"/",

?

import org.springframework.core.io.Resource;import org.springframework.core.io.ClassPathResource;Resource resource = new ClassPathResource("config.properties");Properties  properties= new Properties();InputStream in = resource.getInputStream();properties.load(in);

??

读书人网 >Web前端

热点推荐