Whitelabel Error Page 404 spring boot初学 访问templates出错解决方法

百度了一上午绝大部分答案都是*Application启动类应该在父级包

如果这个项目的启动类的位置绝对没问题,但是还是报404!可以尝试如下方法

Whitelabel Error Page 404 spring boot初学 访问templates出错解决方法

将右侧依赖的包在左边依次找到然后全部删除左边的jar ,然后IDEA右下角自动下载boot的jar包,最后重新启动项目即可成功返回template

Whitelabel Error Page 404 spring boot初学 访问templates出错解决方法


方法二:添加依赖 

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>