其他分享
首页 > 其他分享> > springboot 读取resource下文件(IDE和jar内都能读到)

springboot 读取resource下文件(IDE和jar内都能读到)

作者:互联网

ClassPathResource resource = new ClassPathResource("static/office_template/word_replace_tpl.docx");
File sourceFile = resource.getFile();
InputStream fis = resource.getInputStream();

  参考:https://blog.csdn.net/zhuyu19911016520/article/details/98071242

标签:zhuyu19911016520,resource,springboot,office,tpl,jar,ClassPathResource
来源: https://www.cnblogs.com/wmy10/p/15716609.html