![](https://img-blog.csdnimg.cn/c82632d8f35b450fb6ee49ee57d1eec5.png
以上是存放文件的目录结构
String templateFile = "template/notification/aaa.docx";
//获取文件流
InputStream in = this.getClass().getClassLoader().getResourceAsStream(templateFile);
![](https://img-blog.csdnimg.cn/c82632d8f35b450fb6ee49ee57d1eec5.png
以上是存放文件的目录结构
String templateFile = "template/notification/aaa.docx";
//获取文件流
InputStream in = this.getClass().getClassLoader().getResourceAsStream(templateFile);