Exception processing template “xxx“: Error resolving template [index], template might not exist or

Exception processing template “xxx“: Error resolving template [index], template might not exist or,第1张

Exception processing template “xxx“: Error resolving template [index], template might not exist or

报错:
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依赖

 
 
       org.springframework.boot
       spring-boot-starter-thymeleaf
 
   @RequestMapping("/toLogin")
    public String toLogin(){
        return "views/login";
    }

解决办法:
在重新下载一下依赖,pom.xml右键点击Maven-Reload Project

如下图所示,成功加载依赖,重启项目。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5697483.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存