首先看下报错

主要还是java.lang.NoClassDefFoundError: Could not initialize class
定位问题:

这里面编译之后,压根找不到lib目录,所以找不到这个类很正常
解决方案:
- <dependency>
- <groupId>net.xdstargroupId>
- <artifactId>personinfoartifactId>
- <scope>systemscope>
- <version>0.0.1version>
- <systemPath>${project.basedir}/src/main/resources/lib/xdpersoninfo.jarsystemPath>
- dependency>
把jar包引入一下,groudId一直到version都可以自定义,开心就好,系统路径要好好写,得是真实的
- <build>
- <plugins>
- <plugin>
- <groupId>org.springframework.bootgroupId>
- <artifactId>spring-boot-maven-pluginartifactId>
- <configuration>
- <includeSystemScope>trueincludeSystemScope>
- configuration>
- plugin>
- <plugin>
- <groupId>org.apache.maven.pluginsgroupId>
- <artifactId>maven-compiler-pluginartifactId>
- <version>3.8.1version>
- <configuration>
- <source>1.8source>
- <target>1.8target>
- <encoding>UTF-8encoding>
- <compilerArguments>
- <extdirs>libextdirs>
- compilerArguments>
- configuration>
- plugin>
- plugins>
- build>
build里面加一个路径然后在springboot-maven底下加一个true
最后完美解决本次任务