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