码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2017-09-13 10:19:27      阅读:24252      评论:0      收藏:0      [点我收藏+]

标签:conf   list   参考   nbsp   lis   net   any   over   pre   

错误如下:

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

解决方法:

1、确定模板是否在默认templates文件夹里面,并且路径要和返回的View名字一致。

2、new ModelAndView("/log/loglist");这样写是不对的,应该把开头的斜杠去掉,改成:new ModelAndView("log/loglist");

 

参考:

http://blog.csdn.net/linxingliang/article/details/52566941

https://stackoverflow.com/questions/24260520/error-resolving-template-pages-template-might-not-exist-or-might-not-be-acces

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

标签:conf   list   参考   nbsp   lis   net   any   over   pre   

原文地址:http://www.cnblogs.com/EasonJim/p/7513575.html

(7)
(5)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!