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

springboot工程添加404页面

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

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

访问报错时触发

springboot工程添加404页面

 

相关文章:

  • 2021-06-03
  • 2022-12-23
  • 2021-12-12
  • 2021-10-16
  • 2021-10-05
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2021-09-20
  • 2021-12-29
  • 2022-12-23
相关资源
相似解决方案