1、获取resource目录下的template路径
String path = Thread.currentThread().getContextClassLoader().getResource("").getPath()+"template";