2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-04-28 8942c2346c18609837fbae2f215dceb0e673fa03
fix
已修改3个文件
11 ■■■■ 文件已修改
ximon-admin/src/main/java/com/sandu/ximon/admin/security/authcode/VerifyCodeController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/resources/application-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/resources/application.yml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/security/authcode/VerifyCodeController.java
@@ -50,17 +50,11 @@
        ImageVerificationCode ivc = new ImageVerificationCode();     //用我们的验证码类,生成验证码类对象
        BufferedImage image = ivc.getImage();  //获取验证码
        System.out.println(ivc.getText()+"----加密前的验证码");
//        System.out.println(MD5Util.md5(ivc.getText().toUpperCase())+"----加密后的验证码");
        RedisUtils.getBean().set(key+"",MD5Util.md5(ivc.getText().toUpperCase()),60);
        request.getSession().setAttribute(key+"", MD5Util.md5(ivc.getText().toUpperCase())); //将验证码的文本存在session中
//        ImageVerificationCode.output(image, response.getOutputStream());//将验证码图片响应给客户端
        String img = getBufferedImageToBase64(image, "JPEG");
        String session_vcode = (String) request.getSession().getAttribute(key+"");
        Map map = new HashMap();
        map.put("img", img);
        map.put("vlue", session_vcode);
        map.put("key", key);
        return map;
    }
ximon-admin/src/main/resources/application-test.yml
@@ -14,7 +14,7 @@
    password: Sandu.520.ifzdm # Redis服务器连接密码(默认为空)
    timeout: 300ms # 连接超时时间(毫秒)
server:
  port: 20017
  port: 8080
sandu:
  jwt:
    header: Authorization
ximon-admin/src/main/resources/application.yml
@@ -1,7 +1,6 @@
spring:
  profiles:
    #   active: dev
    active: "@profileActive@"
       active: dev
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8