From c57ec64e634d62d806f2120800efc427f36a9f17 Mon Sep 17 00:00:00 2001 From: liuyuchuan Date: Tue, 8 Feb 2022 18:08:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF=E5=8D=95?= =?UTF-8?q?=E8=AF=8D=E6=8B=BC=E5=86=99=EF=BC=8C=E7=94=B1**Capcha**?= =?UTF-8?q?=E6=94=B9=E4=B8=BA**Captcha**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/gateway/filter/ValidateCodeFilter.java | 4 ++-- .../java/com/ruoyi/gateway/handler/ValidateCodeHandler.java | 6 +++--- .../java/com/ruoyi/gateway/service/ValidateCodeService.java | 6 +++--- .../ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java index b756a3a1..39fcd15d 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java @@ -19,7 +19,7 @@ import reactor.core.publisher.Flux; /** * 验证码过滤器 - * + * * @author ruoyi */ @Component @@ -53,7 +53,7 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory { String rspStr = resolveBodyFromRequest(request); JSONObject obj = JSONObject.parseObject(rspStr); - validateCodeService.checkCapcha(obj.getString(CODE), obj.getString(UUID)); + validateCodeService.checkCaptcha(obj.getString(CODE), obj.getString(UUID)); } catch (Exception e) { diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/ValidateCodeHandler.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/ValidateCodeHandler.java index af5601ba..ef197deb 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/ValidateCodeHandler.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/handler/ValidateCodeHandler.java @@ -15,7 +15,7 @@ import reactor.core.publisher.Mono; /** * 验证码获取 - * + * * @author ruoyi */ @Component @@ -30,7 +30,7 @@ public class ValidateCodeHandler implements HandlerFunction AjaxResult ajax; try { - ajax = validateCodeService.createCapcha(); + ajax = validateCodeService.createCaptcha(); } catch (CaptchaException | IOException e) { @@ -38,4 +38,4 @@ public class ValidateCodeHandler implements HandlerFunction } return ServerResponse.status(HttpStatus.OK).body(BodyInserters.fromValue(ajax)); } -} \ No newline at end of file +} diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/ValidateCodeService.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/ValidateCodeService.java index 3ae9436c..615fb07b 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/ValidateCodeService.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/ValidateCodeService.java @@ -6,7 +6,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult; /** * 验证码处理 - * + * * @author ruoyi */ public interface ValidateCodeService @@ -14,10 +14,10 @@ public interface ValidateCodeService /** * 生成验证码 */ - public AjaxResult createCapcha() throws IOException, CaptchaException; + public AjaxResult createCaptcha() throws IOException, CaptchaException; /** * 校验验证码 */ - public void checkCapcha(String key, String value) throws CaptchaException; + public void checkCaptcha(String key, String value) throws CaptchaException; } diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java index 368a9fc9..62d757bb 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java @@ -43,7 +43,7 @@ public class ValidateCodeServiceImpl implements ValidateCodeService * 生成验证码 */ @Override - public AjaxResult createCapcha() throws IOException, CaptchaException + public AjaxResult createCaptcha() throws IOException, CaptchaException { AjaxResult ajax = AjaxResult.success(); boolean captchaOnOff = captchaProperties.getEnabled(); @@ -96,7 +96,7 @@ public class ValidateCodeServiceImpl implements ValidateCodeService * 校验验证码 */ @Override - public void checkCapcha(String code, String uuid) throws CaptchaException + public void checkCaptcha(String code, String uuid) throws CaptchaException { if (StringUtils.isEmpty(code)) { -- GitLab