AppRegister

This commit is contained in:
2025-06-20 08:23:00 +08:00
parent 27aea7e20d
commit bcaf594145
29 changed files with 725 additions and 148 deletions

View File

@ -229,6 +229,7 @@ public class RedisUtils {
* @return 值
*/
public <T> T get(String key, Class<T> clazz) {
System.out.println("get:------------------------"+ key);
Object value = key == null ? null : redisTemplate.opsForValue().get(key);
if (value == null) {
return null;
@ -324,6 +325,8 @@ public class RedisUtils {
* @return true成功 false 失败
*/
public boolean set(String key, Object value, long time) {
System.out.println("set:------------------------"+ key);
try {
if (time > 0) {
redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);