feat: 首次提交NBA项目

This commit is contained in:
2026-05-14 22:09:55 +08:00
parent 0adfe7d539
commit ddb78e29a3
47 changed files with 2843 additions and 103 deletions

View File

@@ -0,0 +1,24 @@
package com.ping.study.utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import java.time.Duration;
@Component
@Slf4j
public class RedisUtil {
@Autowired
private RedisTemplate<String, String> stringRedisTemplate;
public boolean redisTemplateT(String email,String code) {
//log.info("验证码:{}",code);
return stringRedisTemplate.opsForValue().setIfAbsent(email, code, Duration.ofSeconds(60*5));
}
}