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包:
在这里插入图片描述

posted on 2020-08-31 16:20  会说话的丶猫  阅读(3048)  评论(0编辑  收藏  举报