不清楚什么原因造成错误 有种解决办法就是引入下面的依赖:
把整个build替换掉:
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!-- 工程主入口--> <mainClass>com.demo3.Demo3Application</mainClass> <includeSystemScope>true</includeSystemScope> <fork>true</fork> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build>