原文:Spring Boot使用thymeleaf模板时报异常:template might not exist or might not be accessible by any of the configured Template Resolvers

错误如下: 解决方法: 确定模板是否在默认templates文件夹里面,并且路径要和返回的View名字一致。 new ModelAndView log loglist 这样写是不对的,应该把开头的斜杠去掉,改成:new ModelAndView log loglist 参考: http: blog.csdn.net linxingliang article details https: stack ...

2017-09-13 10:07 0 11657 推荐指数:

查看详情

template might not exist or might not be accessible by any of the configured Template Resolvers

距离上一篇文章已经很长时间了,最近太忙碌了,今天发布spring boot遇到一个问题,找了好久才找到解决办法,今天贴出来和大家一起分享下,首先看错误信息 spring boot + thymeleaf 是第一次使用并发布,本地代码没有问题,发布到服务器就出现了上面的错误,看到网上 ...

Sat May 06 22:38:00 CST 2017 1 12234
template might not exist or might not be accessible by any of the configured

报这个错的前提是在springboot的项目中使用thymeleaf模版或freemarker模版。 然后原因一般有二: 1.真的没有这个模版文件,或是模版文件路径不正确。 2.在非模版页面的请求中没有使用@RestController或@ResponseBody注解,或是反过来,在模版 ...

Sat May 09 14:55:00 CST 2020 0 14854
 
粤ICP备18138465号  © 2018-2026 CODEPRJ.COM