- 将依赖的jar包的
scope
定义为system
,并指定路径
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>15.8</version>
<!--重点-->
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/aspose-words-15.8.0-jdk16.jar</systemPath>
</dependency>
- 修改maven打包插件配置
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--重点-->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>