摘要: 阿里云官网 1.登录官网https://www.aliyun.com/ 2.短信服务,申请签名 3.添加模板 项目中依赖 <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> 阅读全文
posted @ 2023-05-28 21:01 Mr_sven 阅读(24) 评论(0) 推荐(0) 编辑
摘要: public Result sendCode(@PathVariable String phone){ //从redis中获取验证码,如果获取到,返回ok //redis的key为手机号 value为验证码 String code = redisTemplate.opsForValue().get( 阅读全文
posted @ 2023-05-28 19:27 Mr_sven 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 配置 aliyun.sms.regionId=default aliyun.sms.accessKeyId=LTAIxxx aliyun.sms.secret=PAxxxx import org.springframework.beans.factory.InitializingBean; impo 阅读全文
posted @ 2023-05-28 17:03 Mr_sven 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 依赖 <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> </dependency> package com.xxx.common.helper; import io.jsonwebtoken.* 阅读全文
posted @ 2023-05-28 13:11 Mr_sven 阅读(55) 评论(0) 推荐(0) 编辑