各位前辈,我在最近在学到Properties对象的时候遇到一个怪问题
public void test11(){
ServletContext sc=this.getServletContext();
String path=sc.getRealPath("/WEB-INF/classes/p2.properties");
Properties p=new Properties();
p.load(new FileReader(path));
}
这里我想用Properties对象加载一个properties文件,但是它提示我Properties对象里面load函数没有定义,我实在不知道怎么回事,不知道有没有大神帮下我解决这个问题