【Apache POI】将html代码渲染到word中
引入依赖
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
</dependency>
<dependency>
<groupId>io.github.draco1023</groupId>
<artifactId>poi-tl-ext</artifactId>
<version>0.4.3</version>
</dependency>
代码实现
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
Configure.builder().bind("word中需要回填的参数名", htmlRenderPolicy);