springboot自己添加jar包引用时,使用springtoolsuit新建一个springboot工程后,去掉主启动类,test包下面的test文件,pom.xml文件中去掉test坐标,比如添加自己的oracle的jar包如下:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/java/lib/ojdbc6-11.2.jar</systemPath>
</dependency>
并且pom.xml文件中去掉自己的build的plugin,否则maven install时候报错,测试或者compile error
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>