1.String jsonpath = this.getClass().getClassLoader().getResource("/").getPath();
jsonpath = jsonpath.substring(1, jsonpath.length())+"/docs/";
输出:C:/apache-tomcat-8.0.45/webapps/rdims/WEB-INF/classes/(项目发布到Tomcat底下的classes地址)
2.String path = request.getServletContext().getRealPath("/images/");
输出:项目发布到Tomcat底下的地址
3.String filePath = System.getProperty("catalina.base")
输出:Tomcat地址