springboot项目 resources目录下的资源文件加载为null的解决办法
String path = “classpath:config/tenplate.html”
File file =new File(path);
修改为
Resource resource = new DefaultResourceLoader().getResource(path);
InputStream is = resource.getInputStream();
String path = “classpath:config/tenplate.html”
File file =new File(path);
修改为
Resource resource = new DefaultResourceLoader().getResource(path);
InputStream is = resource.getInputStream();