From c0d430f4e5adf08129c2610d9d2b5446bb19c0d6 Mon Sep 17 00:00:00 2001
From: XCSDN <gitee@xcsdn.net>
Date: Thu, 07 Apr 2022 12:57:56 +0800
Subject: [PATCH] update ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java. 字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成 防止由于字典类型不符合前端开发规范而报错
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
index 649fd11..955c784 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
@@ -6,8 +6,8 @@
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
+import com.ruoyi.common.config.RuoYiConfig;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.FastByteArrayOutputStream;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -36,10 +36,6 @@
@Autowired
private RedisCache redisCache;
- // 验证码类型
- @Value("${ruoyi.captchaType}")
- private String captchaType;
-
@Autowired
private ISysConfigService configService;
/**
@@ -64,6 +60,7 @@
BufferedImage image = null;
// 生成验证码
+ String captchaType = RuoYiConfig.getCaptchaType();
if ("math".equals(captchaType))
{
String capText = captchaProducerMath.createText();
--
Gitblit v1.9.2