Java web項目讀取tomcat下的properties或xml配置文件

Java web 項目讀取src或者tomcat下class文件夾下的xml文件或者properties文件   //推薦使用此方法 String path = getClass().getClassLoader().getResource("friend.xml").getPath(); //生成一個文件對象: File file = new File(getClass().getClassLo
相關文章
相關標籤/搜索