mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-12 05:39:00 +08:00
Merge branch 'master' of https://gitee.ltd/pigx/pigx
This commit is contained in:
commit
5f2e9bf5cd
31 files changed
+79
-81
No files matched your search
+2
-2
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.gateway.filter;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstant;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
|
||||
import com.pig4cloud.pigx.common.core.exception.ValidateCodeException;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
@@ -111,7 +111,7 @@ public class ValidateCodeGatewayFilter extends AbstractGatewayFilterFactory {
|
||||
randomStr = request.getQueryParams().getFirst("mobile");
|
||||
}
|
||||
|
||||
String key = CommonConstant.DEFAULT_CODE_KEY + randomStr;
|
||||
String key = CommonConstants.DEFAULT_CODE_KEY + randomStr;
|
||||
if (!redisTemplate.hasKey(key)) {
|
||||
throw new ValidateCodeException("验证码不合法");
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstant;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -59,7 +59,7 @@ public class ImageCodeHandler implements HandlerFunction<ServerResponse> {
|
||||
|
||||
//保存验证码信息
|
||||
String randomStr = serverRequest.queryParam("randomStr").get();
|
||||
redisTemplate.opsForValue().set(CommonConstant.DEFAULT_CODE_KEY + randomStr, text
|
||||
redisTemplate.opsForValue().set(CommonConstants.DEFAULT_CODE_KEY + randomStr, text
|
||||
, SecurityConstants.CODE_TIME, TimeUnit.SECONDS);
|
||||
|
||||
// 转换流信息写出
|
||||
|
||||
Reference in new issue
Block a user