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