Commit bb5cc6f6 authored by dqjdda's avatar dqjdda
Browse files

代码优化

parent 7fe31802
......@@ -18,6 +18,7 @@ import me.zhengjie.modules.security.utils.JwtTokenUtil;
import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.StringUtils;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AccountExpiredException;
......@@ -37,6 +38,9 @@ import javax.servlet.http.HttpServletRequest;
@Api(tags = "系统:系统授权接口")
public class AuthenticationController {
@Value("${jwt.online}")
private String onlineKey;
private final JwtTokenUtil jwtTokenUtil;
private final RedisService redisService;
......@@ -100,7 +104,7 @@ public class AuthenticationController {
captcha.setLen(2);
// 获取运算的结果:5
String result = captcha.text();
String uuid = IdUtil.simpleUUID();
String uuid = onlineKey + IdUtil.simpleUUID();
redisService.saveCode(uuid,result);
return new ImgResult(captcha.toBase64(),uuid);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment