版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/fhf2424045058/article/details/84023549

springboot引入外部依赖jar包并打包springboot引入外部依赖jar包并打包

添加步骤

springboot引入外部依赖jar包并打包

pom.xml相关内容:
  <dependency>
        <groupId>com.cmstk_api</groupId>
        <artifactId>sdk</artifactId>
        <scope>system</scope>
        <version>1.0</version>
        <systemPath>${project.basedir}/lib/cmstk_api.jar</systemPath>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <includeSystemScope>true</includeSystemScope>
            </configuration>
        </plugin>
    </plugins>

    <resources>
        <resource>
            <directory>lib</directory>
            <targetPath>BOOT-INF/lib/</targetPath>
            <includes>
                <include>**/*.jar</include>
            </includes>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <targetPath>BOOT-INF/classes/</targetPath>
        </resource>
    </resources>
</build>


打包好的jar包:


[相关链接]
https://blog.csdn.net/qq_36330643/article/details/76571785)
http://www.jb51.net/article/130449.htm
————————————————
版权声明:本文为CSDN博主「fhf2424045058」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/fhf2424045058/article/details/84023549

相关文章: