原文: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-2025 CODEPRJ.COM