HttpStatus.java 1.7 KB

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