From 0c8f727bd89677feb4c08b781af72807f4bd143a Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 24 一月 2022 13:03:42 +0800 Subject: [PATCH] update maven-jar-plugin 3.2.0 => 3.2.2 update maven-war-plugin 3.2.0 => 3.2.2 update maven-compiler-plugin 3.1 => 3.9.0 update hutool 5.7.18 => 5.7.20 update springboot-admin 2.6.0 => 2.6.2 update redisson 3.16.7 => 3.16.8 update qiniu 7.9.0 => 7.9.2 update aliyun 3.13.1 => 3.14.0 update qcloud 5.6.58 => 5.6.68 update minio 8.3.4 => 8.3.5 --- ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java | 67 ++++++++++++++++++--------------- 1 files changed, 37 insertions(+), 30 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java index 9243a4e..5e07c96 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java @@ -5,67 +5,67 @@ * * @author ruoyi */ -public class Constants -{ +public interface Constants { + /** * UTF-8 瀛楃闆� */ - public static final String UTF8 = "UTF-8"; + String UTF8 = "UTF-8"; /** * GBK 瀛楃闆� */ - public static final String GBK = "GBK"; + String GBK = "GBK"; /** * http璇锋眰 */ - public static final String HTTP = "http://"; + String HTTP = "http://"; /** * https璇锋眰 */ - public static final String HTTPS = "https://"; + String HTTPS = "https://"; /** * 閫氱敤鎴愬姛鏍囪瘑 */ - public static final String SUCCESS = "0"; + String SUCCESS = "0"; /** * 閫氱敤澶辫触鏍囪瘑 */ - public static final String FAIL = "1"; + String FAIL = "1"; /** * 鐧诲綍鎴愬姛 */ - public static final String LOGIN_SUCCESS = "Success"; + String LOGIN_SUCCESS = "Success"; /** * 娉ㄩ攢 */ - public static final String LOGOUT = "Logout"; + String LOGOUT = "Logout"; /** * 娉ㄥ唽 */ - public static final String REGISTER = "Register"; + String REGISTER = "Register"; /** * 鐧诲綍澶辫触 */ - public static final String LOGIN_FAIL = "Error"; + String LOGIN_FAIL = "Error"; /** * 楠岃瘉鐮� redis key */ - public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; + String CAPTCHA_CODE_KEY = "captcha_codes:"; /** * 鐧诲綍鐢ㄦ埛 redis key */ - public static final String LOGIN_TOKEN_KEY = "login_tokens:"; + public static final String LOGIN_TOKEN_KEY = "Authorization:login:token:"; /** * 鍦ㄧ嚎鐢ㄦ埛 redis key @@ -75,45 +75,52 @@ /** * 闃查噸鎻愪氦 redis key */ - public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; + String REPEAT_SUBMIT_KEY = "repeat_submit:"; /** * 闄愭祦 redis key */ - public static final String RATE_LIMIT_KEY = "rate_limit:"; + String RATE_LIMIT_KEY = "rate_limit:"; /** * 楠岃瘉鐮佹湁鏁堟湡锛堝垎閽燂級 */ - public static final Integer CAPTCHA_EXPIRATION = 2; + Integer CAPTCHA_EXPIRATION = 2; + + /** + * 鐧婚檰閿欒 redis key + */ + String LOGIN_ERROR = "login_error:"; + + /** + * 鐧诲綍閿欒娆℃暟 + */ + Integer LOGIN_ERROR_NUMBER = 5; + + /** + * 鐧诲綍閿欒闄愬埗鏃堕棿(鍒嗛挓) + */ + Integer LOGIN_ERROR_LIMIT_TIME = 10; /** * 浠ょ墝 */ - public static final String TOKEN = "token"; + String TOKEN = "token"; /** * 浠ょ墝鍓嶇紑 */ - public static final String LOGIN_USER_KEY = "login_user_key"; + String LOGIN_USER_KEY = "login_user_key"; /** * 鍙傛暟绠$悊 cache key */ - public static final String SYS_CONFIG_KEY = "sys_config:"; + String SYS_CONFIG_KEY = "sys_config:"; /** * 瀛楀吀绠$悊 cache key */ - public static final String SYS_DICT_KEY = "sys_dict:"; + String SYS_DICT_KEY = "sys_dict:"; - /** - * RMI 杩滅▼鏂规硶璋冪敤 - */ - public static final String LOOKUP_RMI = "rmi://"; - - /** - * LDAP 杩滅▼鏂规硶璋冪敤 - */ - public static final String LOOKUP_LDAP = "ldap://"; } + -- Gitblit v1.9.3