报错:
Exception processing template “index”: Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers。
在登录的时候报错
pom.xml中导入了thymeleaf依赖了
<!-- thymeleaf-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
@RequestMapping("/toLogin")
public String toLogin(){
return "views/login";
}
解决办法:
在重新下载一下依赖,pom.xml右键点击Maven-Reload Project
如下图所示,成功加载依赖,重启项目。