Constants.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. package com.boman.domain.constant;
  2. import java.util.HashMap;
  3. /**
  4. * 通用常量信息
  5. *
  6. * @author ruoyi
  7. */
  8. public class Constants
  9. {
  10. /**
  11. * UTF-8 字符集
  12. */
  13. public static final String UTF8 = "UTF-8";
  14. /**
  15. * GBK 字符集
  16. */
  17. public static final String GBK = "GBK";
  18. /**
  19. * http请求
  20. */
  21. public static final String HTTP = "http://";
  22. /**
  23. * https请求
  24. */
  25. public static final String HTTPS = "https://";
  26. /**
  27. * 成功标记
  28. */
  29. public static final Integer SUCCESS = 200;
  30. /**
  31. * 授权成功
  32. */
  33. public static final Integer EMPOWER = 201;
  34. /**
  35. * 登录状态失效
  36. */
  37. public static final Integer LOGIN_EXPIRE = 401;
  38. /**
  39. * 失败标记
  40. */
  41. public static final Integer FAIL = 500;
  42. /**
  43. * 登录成功
  44. */
  45. public static final String LOGIN_SUCCESS = "Success";
  46. /**
  47. * 15天内尝试登录
  48. */
  49. public static final String LOGIN_OUT_TIME = "login_out_time";
  50. /**
  51. * 扫码登录成功
  52. */
  53. public static final String LOGIN_SUCCESS_APP = "login_success:";
  54. /**
  55. * 注销
  56. */
  57. public static final String LOGOUT = "Logout";
  58. /**
  59. * 注册
  60. */
  61. public static final String REGISTER = "Register";
  62. /**
  63. * 登录失败
  64. */
  65. public static final String LOGIN_FAIL = "Error";
  66. /**
  67. * 当前记录起始索引
  68. */
  69. public static final String PAGE_NUM = "pageNum";
  70. /**
  71. * 每页显示记录数
  72. */
  73. public static final String PAGE_SIZE = "pageSize";
  74. /**
  75. * 排序列
  76. */
  77. public static final String ORDER_BY_COLUMN = "orderByColumn";
  78. /**
  79. * 排序的方向 "desc" 或者 "asc".
  80. */
  81. public static final String IS_ASC = "isAsc";
  82. /**
  83. * 验证码 redis key
  84. */
  85. public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
  86. /**
  87. * 验证码有效期(分钟)
  88. */
  89. public static final long CAPTCHA_EXPIRATION = 2;
  90. /**
  91. * 令牌有效期(分钟)
  92. */
  93. public final static long TOKEN_EXPIRE = 120;
  94. /**
  95. * 参数管理 cache key
  96. */
  97. public static final String SYS_CONFIG_KEY = "sys_config:";
  98. /**
  99. * 字典管理 cache key
  100. */
  101. public static final String SYS_DICT_KEY = "sys_dict:";
  102. /**
  103. * 资源映射路径 前缀
  104. */
  105. public static final String RESOURCE_PREFIX = "/profile";
  106. public static final String[] MENU_NAME = new String[]{"新增", "查看","编辑","删除","提交","反提交","导入","导出"};
  107. }