springboot 项目自己引入的外部包打包不进去解决办法
配置依赖包为自己的包名称,路径为resources 下创建一个lib文件夹,将jar包放进去
配置pom.xml文件
<dependency>
<groupId>com.oscartJDBC</groupId>
<artifactId>oscartJDBC</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/oscarJDBC.jar</systemPath>
</dependency>
修改下边位置改为如图
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
配置后重新打包测试即可