完善业务闭环,实现对轮播图的管理,优化数据库表文件
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ public class RedisUtil {
|
||||
public <T> Mono<T> get(String key, Class<T> clazz) {
|
||||
return reactiveRedisTemplate.opsForValue().get(key)
|
||||
.filter(clazz::isInstance)
|
||||
.cast(clazz)
|
||||
.map(clazz::cast)
|
||||
.onErrorResume(e -> {
|
||||
// 旧缓存数据格式不兼容时静默跳过,后续逻辑会 fallback 到 DB 查询
|
||||
log.warn("读取 Redis 缓存失败(可能为旧格式): key={}, error={}", key, e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user