百度了一上午绝大部分答案都是*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>


相关文章:

  • 2021-12-01
  • 2021-04-23
  • 2021-08-15
猜你喜欢
  • 2021-10-14
  • 2022-02-09
  • 2022-01-15
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案