課程
/后端開發
/Java
/SpringBoot開發常用技術整合
我看controller里面是 return?"thymeleaf/error"; 這個按道理不是thymeleaf目下的error么?
2018-07-14
源自:SpringBoot開發常用技術整合 7-1
正在回答
發生異常了,不再是control層里的路徑了。進入的是
mav.setViewName(IMOOC_ERROR_VIEW);
這個視圖
我的理解是這個樣子的,再application中thymeleaf的classpath是templates,而再templates文件夾下有freemarker和templates兩個文件夾,調用的error.html是在templates文件夾下的,所以頁面路徑使用的thymeleaf/error,實際上是templates/thymeleaf/error.html。
舉報
SpringBoot 極簡開發的框架整合利器
1 回答為什么訪問不了templates下面的freemarker和thymeleaf下面的.ftl和.html文件
1 回答err/error 返回500,thymeleaf/error.html沒有加載,不知什么原因?
3 回答thymeleaf無法訪問
2 回答th:selected選擇框(請問,為什么一放在body的最下面就不顯示了,不放在最下面可以顯示?)
2 回答請教一個thymeleaf的問題 報錯org.thymeleaf.exceptions.TemplateInputException: Error resolving template "thymeleaf/index"
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-08-16
發生異常了,不再是control層里的路徑了。進入的是
這個視圖
2018-07-14
我的理解是這個樣子的,再application中thymeleaf的classpath是templates,而再templates文件夾下有freemarker和templates兩個文件夾,調用的error.html是在templates文件夾下的,所以頁面路徑使用的thymeleaf/error,實際上是templates/thymeleaf/error.html。