首页 > 其他分享 >xdocrepor读取resource目录下的word模板报:fr.opensagres.xdocreport.core.XDocReportException: Impossible to crea

xdocrepor读取resource目录下的word模板报:fr.opensagres.xdocreport.core.XDocReportException: Impossible to crea

时间:2022-08-15 15:04:19浏览次数:50  
标签:core docx resource stream xdocrepor maven report 模板

使用xdocrepor导出的时候模板在服务器读取指定路径是没问题的,但是我想放入自己项目resource目录中,总是报格式不支持错误!

 

 模板是放入项目中,编辑的时候会破坏模板结构,导致模板文件类型不支持

解决办法:

pom文件增加文件过滤(maven ckean后重试)

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>

标签:core,docx,resource,stream,xdocrepor,maven,report,模板
From: https://www.cnblogs.com/huigee/p/16588297.html

相关文章