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);
??