Constants.java 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. package jnpf.util;
  2. /**
  3. * 通用常量信息
  4. *
  5. * @author jnpf
  6. */
  7. public class Constants {
  8. /**
  9. * token
  10. */
  11. public static final String AUTHORIZATION = "Authorization";
  12. /**
  13. * UTF-8 字符集
  14. */
  15. public static final String UTF8 = "UTF-8";
  16. /**
  17. * GBK 字符集
  18. */
  19. public static final String GBK = "GBK";
  20. /**
  21. * http请求
  22. */
  23. public static final String HTTP = "http://";
  24. /**
  25. * https请求
  26. */
  27. public static final String HTTPS = "https://";
  28. /**
  29. * 成功标记
  30. */
  31. public static final Integer SUCCESS = 200;
  32. /**
  33. * 失败标记
  34. */
  35. public static final Integer FAIL = 500;
  36. /**
  37. * 登录成功
  38. */
  39. public static final String LOGIN_SUCCESS = "Success";
  40. /**
  41. * 注销
  42. */
  43. public static final String LOGOUT = "Logout";
  44. /**
  45. * 注册
  46. */
  47. public static final String REGISTER = "Register";
  48. /**
  49. * 验证码 redis key
  50. */
  51. public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
  52. /**
  53. * 验证码有效期(分钟)
  54. */
  55. public static final long CAPTCHA_EXPIRATION = 2;
  56. /**
  57. * 令牌有效期(分钟)
  58. */
  59. public final static long TOKEN_EXPIRE = 720;
  60. /**
  61. * swagger版本号
  62. */
  63. public final static String SWAGGER_VERSION = "3.4.8";
  64. /**
  65. * swagger版本号
  66. */
  67. public final static String USER_AGENT = "User-Agent";
  68. /**
  69. * 管理员账号
  70. */
  71. public static final String ADMIN_KEY = "admin";
  72. }