文章目录
1.pom文件引入本地jar包:
- groupId / artifaceId / version:名字可以任意,不重复即可
- ${project.basedir}:表示项目目录
<dependency>
<groupId>com.example</groupId>
<artifactId>example</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/lib/xxx.jar</systemPath>
</dependency>
-
上述方式引进的jar包仅在本地运行时利用,需要将本地jar包打进springboot项目jar包需添加:
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> </build>