首先在/src/main/resources下创建文件夹/public/error

springboot工程添加404页面_Sping

在文件夹里创建html页面,jsp页面不可以。

<html>
<body>
    <img src="/img/error/404.gif">
</body>
</html>

访问报错时触发

springboot工程添加404页面_Sping_02

 

 
 
 
 
posted on 2018-11-14 09:41  吹静静  阅读(1088)  评论(0)  编辑  收藏  举报