获取web项目classes下的路径

this.getClass().getClassLoader().getResource("").getPath();
原文地址:https://www.cnblogs.com/zt528/p/5390213.html