@@ -35,7 +35,7 @@ public class ValidateMain {
3535 }};
3636
3737 private ThreadLocal <List <String >> msgThreadLocal = new ThreadLocal <>(); //错误提示信息
38- private ThreadLocal <String > ruleKeyThreadLoacl = new ThreadLocal <>(); //规则的key
38+ private ThreadLocal <String > ruleKeyThreadLocal = new ThreadLocal <>(); //规则的key
3939
4040 @ Autowired
4141 private RequestParam requestParam ;
@@ -93,7 +93,7 @@ private void validateJsonParam(Map<String, Object> json, Map<String, Object> par
9393
9494 Map <String , Object > jsonValue = (Map <String , Object >)jsonVal ;
9595 Object paramValue = paramMap .get (key );
96- ruleKeyThreadLoacl .set (key );
96+ ruleKeyThreadLocal .set (key );
9797 if (ruleKeySet .containsAll (jsonValue .keySet ())){ //jsonValue为校验规则rules
9898 checkRuleValue (jsonValue , paramValue );
9999 }else {
@@ -128,7 +128,7 @@ private void checkParamValueNull(Map<String, Object> json){
128128 }else if (!ValidateUtils .isRequestFalse (json )){ //对象校验,对象的校验规则未填写request:false,继续校验
129129 for (String key :jsonKeySet ){
130130 if (json .get (key ) instanceof Map ){
131- ruleKeyThreadLoacl .set (key );
131+ ruleKeyThreadLocal .set (key );
132132 checkParamValueNull ((Map <String , Object >) json .get (key ));
133133 }
134134 }
@@ -191,10 +191,10 @@ private void checkRuleValueDetail(Map<String, Object> jsonRule, Object val) {
191191
192192 //处理message为空的情况
193193 private String createFailMsg (Map <String , Object > jsonRule ){
194- String message = ruleKeyThreadLoacl .get () + ValidateUtils .objToStr (jsonRule .get (MESSAGE ));
194+ String message = ruleKeyThreadLocal .get () + ValidateUtils .objToStr (jsonRule .get (MESSAGE ));
195195 if (ValidateUtils .isBlank (message )){
196196 String val = "" ;
197- message = ruleKeyThreadLoacl .get () + "未通过校验,校验规则:" ;
197+ message = ruleKeyThreadLocal .get () + "未通过校验,校验规则:" ;
198198 for (String key :jsonRule .keySet ()){
199199 val = ValidateUtils .objToStr (jsonRule .get (key ));
200200 if (ValidateUtils .isNotBlank (val )){
0 commit comments