|
@@ -6,8 +6,8 @@ import java.util.concurrent.TimeUnit; |
|
@@ -6,8 +6,8 @@ import java.util.concurrent.TimeUnit; |
|
6
|
import javax.annotation.Resource;
|
6
|
import javax.annotation.Resource;
|
|
7
|
import javax.imageio.ImageIO;
|
7
|
import javax.imageio.ImageIO;
|
|
8
|
import javax.servlet.http.HttpServletResponse;
|
8
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
9
|
+import com.ruoyi.common.config.RuoYiConfig;
|
|
9
|
import org.springframework.beans.factory.annotation.Autowired;
|
10
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
10
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
|
11
|
import org.springframework.util.FastByteArrayOutputStream;
|
11
|
import org.springframework.util.FastByteArrayOutputStream;
|
|
12
|
import org.springframework.web.bind.annotation.GetMapping;
|
12
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
13
|
import org.springframework.web.bind.annotation.RestController;
|
13
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -36,10 +36,6 @@ public class CaptchaController |
|
@@ -36,10 +36,6 @@ public class CaptchaController |
|
36
|
@Autowired
|
36
|
@Autowired
|
|
37
|
private RedisCache redisCache;
|
37
|
private RedisCache redisCache;
|
|
38
|
|
38
|
|
|
39
|
- // 验证码类型
|
|
|
|
40
|
- @Value("${ruoyi.captchaType}")
|
|
|
|
41
|
- private String captchaType;
|
|
|
|
42
|
-
|
|
|
|
43
|
@Autowired
|
39
|
@Autowired
|
|
44
|
private ISysConfigService configService;
|
40
|
private ISysConfigService configService;
|
|
45
|
/**
|
41
|
/**
|
|
@@ -64,6 +60,7 @@ public class CaptchaController |
|
@@ -64,6 +60,7 @@ public class CaptchaController |
|
64
|
BufferedImage image = null;
|
60
|
BufferedImage image = null;
|
|
65
|
|
61
|
|
|
66
|
// 生成验证码
|
62
|
// 生成验证码
|
|
|
|
63
|
+ String captchaType = RuoYiConfig.getCaptchaType();
|
|
67
|
if ("math".equals(captchaType))
|
64
|
if ("math".equals(captchaType))
|
|
68
|
{
|
65
|
{
|
|
69
|
String capText = captchaProducerMath.createText();
|
66
|
String capText = captchaProducerMath.createText();
|