当前位置:Gxlcms > 数据库问题 > Spring Boot使用thymeleaf模板时报异常:template might not exist or might not be accessible by any of the configured Template Resolvers

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

时间:2021-07-01 10:21:17 帮助过:41人阅读

解决方法:

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   

人气教程排行