springboot2 異常處理 404 500 處理 錯誤頁面

springboot 在 BasicErrorController 類裏實現了默認的錯誤處理。只需要將對應的錯誤提示文件放到 resources/static/error 目錄,支持模糊匹配,如: static/error/4xx.html static/error/5xx.html static/error/404.html static/error/error.html 運行項目,然後輸入不存
相關文章
相關標籤/搜索