亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

關于spring.thymeleaf.prefix配置

spring.thymeleaf.prefix=classpath:/templates/thymeleaf/ 當我這么設置的時候(error.html我也放入thymeleaf中了,modelview也改過了),結果報錯了,org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/thymeleaf/error.html]")。

結果圖也只顯示h1文字部分,下面的抓取url和報錯信息都沒有,請問這是什么狀況


https://img1.sycdn.imooc.com//5d1780860001ede102510111.jpg

正在回答

1 回答

你在resources下使用templates可是不用設置prefix,會使用默認配置,就默認在resources的templates目錄,,

如果 不用默認的,可以參考我現在用的配置

spring.thymeleaf.prefix=/WEB-INF/view/

spring.thymeleaf.suffix=.html



0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

關于spring.thymeleaf.prefix配置

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號