Spring 模版类 StringRedisTemplate

文档地址 https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/core/StringRedisTemplate.html

StringRedisTemplate 文档介绍

public class StringRedisTemplate extends RedisTemplate<String,String>

RedisTemplate 的字符串扩展。由于大多数针对 Redis 的操作都是基于字符串的,因此此类提供了一个专用类,以最大限度地减少其通用模板的配置,尤其是在序列化器方面。
String-focused extension of RedisTemplate. Since most operations against Redis are String based, this class provides a dedicated class that minimizes configuration of its more generic template especially in terms of serializers.

Note that this template exposes the RedisConnection used by the RedisCallback as a StringRedisConnection.

posted @ 2025-04-11 14:42  kuki'  阅读(15)  评论(0)    收藏  举报