Spring Boot使用thymeleaf模板时报异常:template might not exist or might not be accessible by any of the configured Template Resolvers
错误如下:
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");
参考: