1 如何使用類路徑作爲其一部分創建maven屬性?如何創建maven屬性 來源 2010-04-16 Gandalf StormCrow +0 你的意思是「類路徑」,還是......? – 2010-04-16 12:44:29 +0 對不起,我將編輯 – 2010-04-16 13:03:30 +0 可能的重複http://stackoverflow.com/questions/2643091/how-to-access-a-xml-file-in-a-maven-project-so-it-stays-available - 當包裝 – 2010-04-16 14:24:27
0 你並不需要創建任何東西,只需從classpath加載文件(如this answer提到): InputStream is = getClass().getResourceAsStream("/file.txt "); ... 來源 2010-04-16 14:19:49
你的意思是「類路徑」,還是......? – 2010-04-16 12:44:29
對不起,我將編輯 – 2010-04-16 13:03:30
可能的重複http://stackoverflow.com/questions/2643091/how-to-access-a-xml-file-in-a-maven-project-so-it-stays-available - 當包裝 – 2010-04-16 14:24:27