This application has no explicit mapping for /error解决
SpringBoot官方推荐使用Thymeleaf模板引擎,默认都是使用Thymeleaf模板引擎的,看自己是否导入了Thymeleaf依赖,没有导入Thymeleaf依赖,也会报404错误
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>