1、添加本地包路径 <dependency> <groupId>xxxxx</groupId> <artifactId>xxxx</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${project.basedir}/libs/xxxxx.jar</systemPath> </dependency>
2、指明打包时将外部包打包到项目jar
<plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins>