首页 > 其他分享 >easy-captcha使用

easy-captcha使用

时间:2023-02-21 00:34:43浏览次数:23  
标签:request response captcha easy 使用 public

1.pom.xml

<!--    图形验证码-->
<dependency>
  <groupId>com.github.whvcse</groupId>
  <artifactId>easy-captcha</artifactId>
  <version>1.6.2</version>
</dependency>

2.controller层

@Controller
public class CaptchaController {
    @RequestMapping("/captcha")
    public void captcha(HttpServletRequest request, HttpServletResponse response) throws Exception {
        CaptchaUtil.out(request, response);
    }
}

3.前端使用

<img src="/LwxWeb/captcha" class="layadmin-user-login-codeimg" id="LAY-user-get-vercode">

标签:request,response,captcha,easy,使用,public
From: https://www.cnblogs.com/lwx11111/p/17139498.html

相关文章