1 异常描述 2 异常解决 pom文件中有依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> 这个依赖是将springboot项目打成war包在外部tomcat中使用时才需要加上的,在本地运行项目要将这个依赖去掉。