# 核心Service
包路径:pro.haichuang.framework.redis.service (opens new window)
# RedisService (opens new window)
警告
所有Redis相关操作必须使用RedisService 接口
# DefaultRedisServiceImpl (opens new window)
DefaultRedisServiceImpl 为
RedisService 默认实现,已默认注入到Spring中
可直接注入RedisService ,支持自定义实现(需要手动注入到Spring中)
👇示例👇
@RestController
@RequestMapping("/test")
public class TestController {
@Autowired
private RedisService redisService;
......
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9