Springboot获取resource的路径

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

 

posted @ 2019-05-29 16:36  小白啊小白,Fighting  阅读(33244)  评论(3编辑  收藏  举报