- 获取resource下static路径
String path = this.getClass().getClassLoader().getResource("static").getPath();
- 获取webapp路径
String path = ServletContextFactory.getServletContext().getRealPath("/");

String path = this.getClass().getClassLoader().getResource("static").getPath();
String path = ServletContextFactory.getServletContext().getRealPath("/");