Constant.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package com.pavis.backend.slim.common.constant;
  2. /**
  3. * @author semi
  4. * @create 2023-04-20 16:59
  5. */
  6. public class Constant {
  7. /**
  8. * UTF-8 字符集
  9. */
  10. public static final String UTF8 = "UTF-8";
  11. /**
  12. * 资源映射路径 前缀
  13. */
  14. public static final String RESOURCE_PREFIX = "/profile";
  15. /**
  16. * 登录用户 key
  17. */
  18. public static final String LOGIN_USER_KEY = "login_user_key";
  19. /**
  20. * 登录用户 redis key
  21. */
  22. public static final String LOGIN_TOKEN_KEY = "login_tokens:";
  23. /**
  24. * 令牌前缀
  25. */
  26. public static final String TOKEN_PREFIX = "Bearer ";
  27. /**
  28. * 令牌
  29. */
  30. public static final String TOKEN = "token";
  31. /**
  32. * 登录账户密码错误次数 redis key
  33. */
  34. public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
  35. /**
  36. * 用户名长度限制
  37. */
  38. public static final int USERNAME_MIN_LENGTH = 2;
  39. public static final int USERNAME_MAX_LENGTH = 20;
  40. /**
  41. * 密码长度限制
  42. */
  43. public static final int PASSWORD_MIN_LENGTH = 5;
  44. public static final int PASSWORD_MAX_LENGTH = 20;
  45. /**
  46. * 防重提交 redis key
  47. */
  48. public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
  49. /**
  50. * 文件夹分隔符
  51. */
  52. public static final String DIR_SEP = "/";
  53. /**
  54. * 点分隔符
  55. */
  56. public static final String POINT_SEP = ".";
  57. /**
  58. * 小文件最大大小: 5MB = 1024 * 1024 * 5
  59. */
  60. // public static final long FILE_MAX_SIZE = 5242880L;
  61. /**
  62. * 海阳项目使用
  63. * 小文件最大大小: 50MB = 1024 * 1024 * 50
  64. */
  65. public static final long FILE_ZERO_MAX_SIZE = 52428800L;
  66. // public static final long FILE_MAX_SIZE = 5242880L;
  67. public static final long FILE_MAX_SIZE = 209715200L;
  68. }