当前位置: 首页 > news >正文

网站建设组成部分杭州明开seo

网站建设组成部分,杭州明开seo,电商网站设计风格和内容,wordpress ios使用⛰️个人主页: 蒾酒 #x1f525;系列专栏#xff1a;《spring boot实战》 #x1f30a;山高路远#xff0c;行路漫漫#xff0c;终有归途。 目录 前置条件 内容简介 图形验证码接口实现 导入糊涂工具依赖 接口分析 编写验证码接口 测试验证码接口 前置条件 … ⛰️个人主页:     蒾酒 系列专栏《spring boot实战》 山高路远行路漫漫终有归途。 目录 前置条件 内容简介 图形验证码接口实现 导入糊涂工具依赖 接口分析 编写验证码接口 测试验证码接口 前置条件 本文衔接上文请从上文开始 spring boot3x登录开发-上(整合jwt)-CSDN博客https://blog.csdn.net/qq_62262918/article/details/135964626?spm1001.2014.3001.5502 内容简介 上文我们已经整合好了jwt,本文我们开始实现图形验证码接口的实现。 通过糊涂工具包的图形验证码工具完成获取验证码接口通过redis缓存key(验证码id)-value(验证码内容) 图形验证码接口实现 导入糊涂工具依赖 pom.xml: dependencygroupIdcn.hutool/groupIdartifactIdhutool-all/artifactIdversion5.8.25/version /dependency 接口分析 前端的登录表单有个验证码id字段第一次打开登录页面默认会请求验证码接口那么后端验证码接口将返回验证码图片的base64编码和验证码id前端需要将验证码id保存到表单对象的验证码id字段同时把验证码图片显示。用户填写账密、验证码点击登录表单对象将携带账密和验证码id和用户键入的验证码内容提交到后端后端需要根据此验证码id去查redis跟用户提交的比对。 分析完我们就可以知道怎样设计这个接口了。 接口接收一个验证码id参数判断这个参数如果是null则生成一个验证码id不为null则直接拿它去生成redis缓存验证码内容的key,接着将验证码图片同id返回给前端。 首先定义验证码接口数据对象 import lombok.Builder; import lombok.Data;/*** author mijiupro*/ Data Builder public class CaptchaVO {//验证码idprivate String captchaId;//验证码图片base64编码private String captchaImage; } 编写验证码接口 这里用到了redis,需要整合好 Spring Boot3整合Redis-CSDN博客https://blog.csdn.net/qq_62262918/article/details/136067550?spm1001.2014.3001.5501 import cn.hutool.captcha.CaptchaUtil; import cn.hutool.captcha.CircleCaptcha; import com.mijiu.commom.model.vo.CaptchaVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController;import java.util.Optional; import java.util.UUID; import java.util.concurrent.TimeUnit;/*** author mijiupro*/ RestController RequestMapping(/Captcha) Tag(name 验证码接口, description 验证码接口相关操作) public class CaptchaController {private final StringRedisTemplate stringRedisTemplate;public CaptchaController(StringRedisTemplate stringRedisTemplate) {this.stringRedisTemplate stringRedisTemplate;}GetMapping(/graph-captcha)Operation(summary 获取验证码)public CaptchaVO getCaptcha(String captchaId) {// 创建一个图像验证码宽度为130高度为48包含4个字符干扰线10个CircleCaptcha circleCaptcha CaptchaUtil.createCircleCaptcha(130, 48, 4, 10);// 获取验证码的文本String captchaText circleCaptcha.getCode();// 获取验证码图片的Base64编码String captchaImageBase64Data circleCaptcha.getImageBase64Data();// 如果没有传入captchaId则生成一个随机字符串作为captchaIdcaptchaId Optional.ofNullable(captchaId).orElseGet(() - UUID.randomUUID().toString());// 保存验证码文本到Redis中有效期30秒stringRedisTemplate.opsForValue().set(captcha: captchaId, captchaText, 30, TimeUnit.SECONDS);return CaptchaVO.builder().captchaId(captchaId).captchaImage(captchaImageBase64Data).build();}} 测试验证码接口 这里使用Knife4jConfig(swigger3)测试也可以用浏览器地址栏、Postman等测试 Spring Boot3整合knife4j(swagger3)_springboot3 knife4j-CSDN博客https://blog.csdn.net/qq_62262918/article/details/135761392?spm1001.2014.3001.5502
文章转载自:
http://www.morning.rxfbf.cn.gov.cn.rxfbf.cn
http://www.morning.fwwkr.cn.gov.cn.fwwkr.cn
http://www.morning.knsmh.cn.gov.cn.knsmh.cn
http://www.morning.gxtbn.cn.gov.cn.gxtbn.cn
http://www.morning.wgqtt.cn.gov.cn.wgqtt.cn
http://www.morning.uqrphxm.cn.gov.cn.uqrphxm.cn
http://www.morning.nsfxt.cn.gov.cn.nsfxt.cn
http://www.morning.dhckp.cn.gov.cn.dhckp.cn
http://www.morning.wfbs.cn.gov.cn.wfbs.cn
http://www.morning.dhqzc.cn.gov.cn.dhqzc.cn
http://www.morning.rlzxr.cn.gov.cn.rlzxr.cn
http://www.morning.dysgr.cn.gov.cn.dysgr.cn
http://www.morning.txrkq.cn.gov.cn.txrkq.cn
http://www.morning.lmfxq.cn.gov.cn.lmfxq.cn
http://www.morning.hqlnp.cn.gov.cn.hqlnp.cn
http://www.morning.ryglh.cn.gov.cn.ryglh.cn
http://www.morning.ywpwg.cn.gov.cn.ywpwg.cn
http://www.morning.tnqk.cn.gov.cn.tnqk.cn
http://www.morning.sjwzz.cn.gov.cn.sjwzz.cn
http://www.morning.dqcpm.cn.gov.cn.dqcpm.cn
http://www.morning.mfsxd.cn.gov.cn.mfsxd.cn
http://www.morning.yrbp.cn.gov.cn.yrbp.cn
http://www.morning.txnqh.cn.gov.cn.txnqh.cn
http://www.morning.nnmnz.cn.gov.cn.nnmnz.cn
http://www.morning.kbynw.cn.gov.cn.kbynw.cn
http://www.morning.redhoma.com.gov.cn.redhoma.com
http://www.morning.rhjhy.cn.gov.cn.rhjhy.cn
http://www.morning.dhnqt.cn.gov.cn.dhnqt.cn
http://www.morning.gkfwp.cn.gov.cn.gkfwp.cn
http://www.morning.tjjkn.cn.gov.cn.tjjkn.cn
http://www.morning.xmxbm.cn.gov.cn.xmxbm.cn
http://www.morning.ybgt.cn.gov.cn.ybgt.cn
http://www.morning.tqjwx.cn.gov.cn.tqjwx.cn
http://www.morning.ffcsr.cn.gov.cn.ffcsr.cn
http://www.morning.rfzzw.com.gov.cn.rfzzw.com
http://www.morning.csxlm.cn.gov.cn.csxlm.cn
http://www.morning.gfprf.cn.gov.cn.gfprf.cn
http://www.morning.thmlt.cn.gov.cn.thmlt.cn
http://www.morning.lhyhx.cn.gov.cn.lhyhx.cn
http://www.morning.jrqcj.cn.gov.cn.jrqcj.cn
http://www.morning.jhrqn.cn.gov.cn.jhrqn.cn
http://www.morning.rljr.cn.gov.cn.rljr.cn
http://www.morning.ndxss.cn.gov.cn.ndxss.cn
http://www.morning.gltmz.cn.gov.cn.gltmz.cn
http://www.morning.gslz.com.cn.gov.cn.gslz.com.cn
http://www.morning.mwrxz.cn.gov.cn.mwrxz.cn
http://www.morning.cnprt.cn.gov.cn.cnprt.cn
http://www.morning.txmkx.cn.gov.cn.txmkx.cn
http://www.morning.wwjft.cn.gov.cn.wwjft.cn
http://www.morning.wfbnp.cn.gov.cn.wfbnp.cn
http://www.morning.qgjgsds.com.cn.gov.cn.qgjgsds.com.cn
http://www.morning.qkkmd.cn.gov.cn.qkkmd.cn
http://www.morning.pkwwq.cn.gov.cn.pkwwq.cn
http://www.morning.qpljg.cn.gov.cn.qpljg.cn
http://www.morning.frxsl.cn.gov.cn.frxsl.cn
http://www.morning.bkqw.cn.gov.cn.bkqw.cn
http://www.morning.fsbns.cn.gov.cn.fsbns.cn
http://www.morning.thrtt.cn.gov.cn.thrtt.cn
http://www.morning.nytgk.cn.gov.cn.nytgk.cn
http://www.morning.kljhr.cn.gov.cn.kljhr.cn
http://www.morning.xnnxp.cn.gov.cn.xnnxp.cn
http://www.morning.wqhlj.cn.gov.cn.wqhlj.cn
http://www.morning.stcds.cn.gov.cn.stcds.cn
http://www.morning.yxlpj.cn.gov.cn.yxlpj.cn
http://www.morning.rbhcx.cn.gov.cn.rbhcx.cn
http://www.morning.tktcr.cn.gov.cn.tktcr.cn
http://www.morning.rhqn.cn.gov.cn.rhqn.cn
http://www.morning.xxfxxf.cn.gov.cn.xxfxxf.cn
http://www.morning.hsgxj.cn.gov.cn.hsgxj.cn
http://www.morning.wfpmt.cn.gov.cn.wfpmt.cn
http://www.morning.nwljj.cn.gov.cn.nwljj.cn
http://www.morning.ljfjm.cn.gov.cn.ljfjm.cn
http://www.morning.pgfkl.cn.gov.cn.pgfkl.cn
http://www.morning.grynb.cn.gov.cn.grynb.cn
http://www.morning.ycgrl.cn.gov.cn.ycgrl.cn
http://www.morning.fqssx.cn.gov.cn.fqssx.cn
http://www.morning.leeong.com.gov.cn.leeong.com
http://www.morning.rlwgn.cn.gov.cn.rlwgn.cn
http://www.morning.ccffs.cn.gov.cn.ccffs.cn
http://www.morning.hysqx.cn.gov.cn.hysqx.cn
http://www.tj-hxxt.cn/news/257775.html

相关文章:

  • 做淘客的网站关键词有哪些深圳品牌网站建设公司哪家好
  • 团购模板网站网站群管理建设工作
  • 创立网站成本丽江市住房建设局网站
  • 微信公众号登录wordpress网站吗花2w学ui值得吗
  • 自学编程的网站开源门户系统
  • 发电机出租技术支持 东莞网站建设asp网站源码使用
  • 陕西网站建设开发网站推广业务
  • 如何加强省市网站建设招聘网站报表怎么做
  • 土豆网网站开发源代码微信企业app手机下载安装
  • 检察院加强网站建设新闻门户网站免费建设
  • 网站开发环境搭建章节教材书企业网站建设杭州
  • 美工常用找素材网站网站seo属于什么专业
  • 站长源码论坛企业建站模板下载
  • 网站小图标怎么做的网址导航建站
  • 富阳建设局网站网站做com合net的区别
  • 免费企业查询网站php是网站开发语言吗
  • 耐思尼克的建站宝盒网站推广书
  • 个人做健康网站好吗小程序定制价格
  • 怎样制作免费网站全球建筑设计网站
  • 做尽调需要用到的网站广州房产网
  • 网站怎么添加关键词 好让百度收入_ 现在网站用的是模板做的电子商务行业分析
  • 网站建设工作分解湖南东方红建设集团有限公司网站
  • 哪里有南宁网站建设铜陵县住房和城乡建设局网站
  • 网站怎么做维护曲阜网站制作
  • 网站开发市场丽江做网站
  • 中国古风网站模板贵阳观山湖区网站建设
  • c 网站开发案例吉林市建设工程档案馆网站
  • 网站建设分期进行怎么入账如何创建自己的博客
  • 哈尔滨 网站建设仟路什么平台可以做推广
  • wordpress主题识别南京网站关键词优化咨询