原文:springboot thymeleaf 打包成jar包后報錯 template might not exist or might not be accessible by any of the configured Template Resolvers

解決方案: 改成 Controller 寫法 參考: https: blog.csdn.net qq article details https: www.cnblogs.com kinome p .html ...

2021-03-14 21:28 0 259 推薦指數:

查看詳情

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