项目中经常遇到的异常情况

  • 400-Bad Request
  • 401-Unauthorized

    If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials.

  • 403-Forbidden

    The server understood the request, but is refusing to fulfill it.

  • 404-Resource not found
  • 500-Internal Server Error

    定制错误页面的方法

  1. 在src/main/resource/templates/error/目录中增加
  2. 在src/main/resource/public/error/目录中增加

其中第一种方式的优先级大于第二种。
springboot 定制错误页面

参考文档

相关文章:

  • 2021-11-07
  • 2021-11-03
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
猜你喜欢
  • 2021-06-08
  • 2021-07-25
  • 2021-12-12
  • 2021-11-17
  • 2021-09-18
相关资源
相似解决方案