一、classpath指向了那里
1、用maven構建(build)項目時,默認的classpath指向target/classes/ 2、用maven打包(package)項目時,默認的classpath指向war內部的WEB-INF/classes/
二、如果獲取springboot項目默認的classpath
// 獲取classpath String classpath = ResourceUtils.getURL("classpath:").getPath();
一、classpath指向了那里
1、用maven構建(build)項目時,默認的classpath指向target/classes/ 2、用maven打包(package)項目時,默認的classpath指向war內部的WEB-INF/classes/
二、如果獲取springboot項目默認的classpath
// 獲取classpath String classpath = ResourceUtils.getURL("classpath:").getPath();
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。