| | |
| | | import com.ruoyi.project.system.service.ISysConfigService;
|
| | | import jakarta.annotation.Resource;
|
| | | import jakarta.servlet.http.HttpServletResponse;
|
| | | import lombok.AllArgsConstructor;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.util.FastByteArrayOutputStream;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @RestController
|
| | | @AllArgsConstructor
|
| | | @RequiredArgsConstructor
|
| | | public class CaptchaController
|
| | | {
|
| | | @Resource(name = "captchaProducer")
|
| | |
| | | @Resource(name = "captchaProducerMath")
|
| | | private Producer captchaProducerMath;
|
| | |
|
| | | private RedisCache redisCache;
|
| | | private final RedisCache redisCache;
|
| | |
|
| | | // 验证码类型
|
| | | @Value("${ruoyi.captchaType}")
|
| | | private String captchaType;
|
| | |
|
| | | private ISysConfigService configService;
|
| | | private final ISysConfigService configService;
|
| | |
|
| | | /**
|
| | | * 生成验证码
|