周凯,个人博客

  • 前端
  • 嵌入式
  • 工具
  • 后端
  • 随笔
个人记录
  1. 首页
  2. 后端
  3. java
  4. 正文

spring-boot 使用外部的依赖包jar

2025年 10月 14日 149点热度 0人点赞 0条评论
  • 在业务 pom.xml中配置
  <!--集成sdk-->
  <dependency>
    <groupId>com.aaa</groupId>   <!--自定义-->
    <artifactId>aaa-sdk</artifactId>  <!--自定义-->
    <version>0.0.1-SNAPSHOT</version>  <!--自定义-->
    <scope>system</scope>
     <!--jar包路径 注意:这里用的是  {pom.basedir}-->
    <systemPath>${pom.basedir}/lib/aaa-user-3.9.2-SNAPSHOT.jar</systemPath>  
  </dependency>
  • 在打包的pom.xml中配置,支持打包本地的jar
    <build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <includeSystemScope>true</includeSystemScope>
            </configuration>
        </plugin>
    </plugins>
    </build>

🎯 拓展阅读提示

本文涉及的内容已同步至公众号后台,我会在那里分享更多深度内容和实用技巧

→ 点击关注:一行梦境

公众号二维码
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2025年 10月 14日

周凯

这个人很懒,什么都没留下

打赏 点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2022-现在 周凯,个人博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蒙ICP备18004897号