在springboot项目中,打包本地的外部jar包,到运行的jar包中

1、

配置依赖

<dependency>
<groupId>com.genesyslab</groupId>
<artifactId>genesyslab</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/genesys-1.0.jar</systemPath>
</dependency>

2、配置插件
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
posted @ 2024-05-22 18:29  daibiao123  阅读(288)  评论(0)    收藏  举报