HttpStatus.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package com.zhiyun.common.constant;
  2. /**
  3. * 返回状态码
  4. *
  5. * @author ruoyi
  6. */
  7. public class HttpStatus {
  8. /**
  9. * 操作成功
  10. */
  11. public static final int SUCCESS = 200;
  12. /**
  13. * 对象创建成功
  14. */
  15. public static final int CREATED = 201;
  16. /**
  17. * 请求已经被接受
  18. */
  19. public static final int ACCEPTED = 202;
  20. /**
  21. * 操作已经执行成功,但是没有返回数据
  22. */
  23. public static final int NO_CONTENT = 204;
  24. /**
  25. * 资源已被移除
  26. */
  27. public static final int MOVED_PERM = 301;
  28. /**
  29. * 重定向
  30. */
  31. public static final int SEE_OTHER = 303;
  32. /**
  33. * 资源没有被修改
  34. */
  35. public static final int NOT_MODIFIED = 304;
  36. /**
  37. * 参数列表错误(缺少,格式不匹配)
  38. */
  39. public static final int BAD_REQUEST = 400;
  40. /**
  41. * 未授权
  42. */
  43. public static final int UNAUTHORIZED = 401;
  44. /**
  45. * 访问受限,授权过期
  46. */
  47. public static final int FORBIDDEN = 403;
  48. /**
  49. * 资源,服务未找到
  50. */
  51. public static final int NOT_FOUND = 404;
  52. /**
  53. * 不允许的http方法
  54. */
  55. public static final int BAD_METHOD = 405;
  56. /**
  57. * 资源冲突,或者资源被锁
  58. */
  59. public static final int CONFLICT = 409;
  60. /**
  61. * 不支持的数据,媒体类型
  62. */
  63. public static final int UNSUPPORTED_TYPE = 415;
  64. /**
  65. * 系统内部错误
  66. */
  67. public static final int ERROR = 500;
  68. /**
  69. * 接口未实现
  70. */
  71. public static final int NOT_IMPLEMENTED = 501;
  72. /**
  73. * 系统警告消息
  74. */
  75. public static final int WARN = 601;
  76. }