美文网首页
Springboot项目打包引入lib目录下jar包

Springboot项目打包引入lib目录下jar包

作者: AC编程 | 来源:发表于2022-02-15 11:14 被阅读0次

    一、操作步骤

    1、首先项目引入jar包

    引入jar包

    2、pom文件中引入jar

            <!-- 引入本地jar -->
            <dependency>
                <groupId>com.topsoft</groupId>
                <artifactId>cms-pak</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <scope>system</scope>
                <systemPath>${project.basedir}/src/main/resources/lib/cms-pak.jar</systemPath>
            </dependency>
    

    3、plugin配置
    加上配置,将本地依赖包打进jar里

     <configuration>
            <includeSystemScope>true</includeSystemScope>
     </configuration>
    
    <build>
          <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <includeSystemScope>true</includeSystemScope>
                    </configuration>
                </plugin>
        <plugins>
    </build>
    

    二、补充

    可以通过jd-gui工具查看jar源码

    相关文章

      网友评论

          本文标题:Springboot项目打包引入lib目录下jar包

          本文链接:https://www.haomeiwen.com/subject/itnklrtx.html