異常關鍵內容:
Error resolving template ‘’/emp/add" template might not exist or might not be accessible by any of the configured Template Resolvers。
具體截圖如下:
場景:
- 本地運行項目能訪問相關頁面,服務器在運行jar就出問題。
- 經過度娘與調試分析,原來是springboot+themeleaf框架,返回頁面不能多出“/”。
在此,做出記錄總結。
解決如下:
去掉返回視圖路徑的 “/”,具體截圖如下:
錯誤:
正確: