@ -32,6 +33,9 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
@@ -32,6 +33,9 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
@Autowired
privateValidateCodeServicevalidateCodeService;
@Autowired
privateCaptchaPropertiescaptchaProperties;
privatestaticfinalStringCODE="code";
privatestaticfinalStringUUID="uuid";
@ -42,8 +46,8 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
@@ -42,8 +46,8 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
@ -35,8 +36,8 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
@@ -35,8 +36,8 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
@Autowired
privateRedisServiceredisService;
// 验证码类型
privateStringcaptchaType="math";
@Autowired
privateCaptchaPropertiescaptchaProperties;
/**
*生成验证码
@ -44,6 +45,14 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
@@ -44,6 +45,14 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
@ -51,6 +60,7 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
@@ -51,6 +60,7 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
StringcapStr=null,code=null;
BufferedImageimage=null;
StringcaptchaType=captchaProperties.getType();
// 生成验证码
if("math".equals(captchaType))
{
@ -77,7 +87,6 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
@@ -77,7 +87,6 @@ public class ValidateCodeServiceImpl implements ValidateCodeService