1、添加jar包
2、手动引入依赖
<dependency> <groupId>com.aaa</groupId> <artifactId>data_extract</artifactId> <scope>system</scope> <version>1.0.1</version> <systemPath>${project.basedir}/src/main/resources/libs/service-invoke-sdk-1.0.1-SNAPSHOT.jar</systemPath> </dependency>
3、springboot在打包的时候,调用spring-boot-maven-plugin,执行repackage把tomcat和resource,lib等合成一个新的jar。想要将系统jar打进去,必须配置includeSystemScope。最终会将lib放入BOOT-INFlib
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> <executions> <execution> <goals> <goal>build-info</goal> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build>