• 将依赖的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>

# To Be Continued!😎

Last Updated: 1/11/2022, 9:58:41 AM