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