spring boot 加载本地jar文件

需要在pom中添加如下2段代码即可

<dependency>
    <groupId>com.romic.api</groupId>
    <artifactId>demo</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/com-romic-api.jar</systemPath>
</dependency>
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <includeSystemScope>true</includeSystemScope>
    </configuration>
</plugin>

 

posted @ 2019-06-12 13:45  Romic的博客园  阅读(522)  评论(1编辑  收藏  举报