Spring Boot Maven 项目添加本地 jar 包依赖

Spring Boot Maven About 781 words

添加依赖

把本地依赖的jar包放在resources下的lib目录中。

<dependency>
    <groupId>com.test</groupId>
    <artifactId>test-utils</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/src/main/resources/lib/test-utils-1.0.0.jar</systemPath>
</dependency>

修改配置

Spring Boot插件添加<includeSystemScope>true</includeSystemScope>配置。

<plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <includeSystemScope>true</includeSystemScope>
        </configuration>
    </plugin>
</plugins>
Views: 2,185 · Posted: 2020-03-20

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh