# springboot-esaycaptcha **Repository Path**: xxxlomg/springboot-esaycaptcha ## Basic Information - **Project Name**: springboot-esaycaptcha - **Description**: springboot集成Redis对验证码简单例子 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-07-24 - **Last Updated**: 2023-08-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # springboot-esaycaptcha #### 介绍 springboot集成Redis对验证码应用的简单例子 ## 第一步 ### 导入pom依赖 ````xml org.projectlombok lombok com.github.whvcse easy-captcha 1.6.2 org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-data-redis org.apache.commons commons-pool2 2.10.0 com.alibaba fastjson 1.2.75 ```` ### 配置yml ````yaml server: port: 8081 spring: redis: database: 3 jedis: pool: max-active: 8 max-wait: -1 lettuce: pool: min-idle: 0 timeout: 5000 ```` 这里配置根据个人开发环境来写,这里只是简单配置 ## 第二步 编译运行并访问 ````htt http://localhost:8081/captcha ```` F12就可以看到头请求中有个 id,这个id就是存入Redis的键 ````h Cache-Control: no-cache Connection: keep-alive Content-Type: image/gif Date: Sat, 24 Jul 2021 09:06:28 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT id: bb67e844-82e3-48c8-b4e4-975eec9cf5ec Keep-Alive: timeout=60 Pragma: No-cache Transfer-Encoding: chunked ```` ## 项目参与 **xxxlomg、superming**