springboot引入外部依赖jar包

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fhf2424045058/article/details/84023549

在这里插入图片描述
在这里插入图片描述

添加步骤

在这里插入图片描述

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

猜你喜欢

转载自blog.csdn.net/fhf2424045058/article/details/84023549