91名师指路-头部
91名师指路

spring boot将自定义的jar引入到项目中

由于某些原因,现在不支持支付宝支付,如需要购买源码请加博主微信进行购买,微信号:13248254750

一:pom

<dependency>
<groupId>com.meituan.data</groupId>
<artifactId>data</artifactId>
<version>20260202</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/MtOpJavaSDK-1.0-SNAPSHOT.jar</systemPath>
</dependency>


二:添加spring-boot-maven-plugin插件,设置<includeSystemScope>true</includeSystemScope>,如果不设置,在打包时不会将自定义的jar导入到项目的jar中去
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>






2026-02-03 19:04:15     阅读(5)

名师出品,必属精品    https://www.91mszl.com

联系博主    
用户登录遮罩层
x

账号登录

91名师指路-底部