spring-boot-autoconfigure的版本一定要和spring-boot-starter-web的版本一致 否则报错
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.3.7.RELEASE</version> <configuration> <!--这一行代码一定要有否则报错--> <skip>true</skip> </configuration> </plugin> </plugins> </build>