springboot 打成jar包 docker部署服务器后 获取jar包中资源文件

因为jar运行部署后无法获取内部文件路径,所以不能使用path
InputStream resourceAsStream = 
new ClassPathResource("files/official_doc_model.docx").getInputStream();

在这里插入图片描述

posted @ 2021-04-20 09:34  qwer78  阅读(382)  评论(0)    收藏  举报