解决新建项目找不到页面问题

woofcrab / 2023-05-20 / 原文

原因一:

  主启动类位置要放在与controller包同级目录下

原因二:

  缺少thymeleaf启动依赖

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