Redis
迷糊星辰
保留下资料,供以后温习
展开
-
Redis订阅模式示例
1、Maven引入 <!-- Redis --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency>原创 2021-09-10 12:44:43 · 94 阅读 · 0 评论 -
spring-cache集成redis
在Spring-boot集成Redis基础上,集成spring-cashSpring-boot集成Redis1、RedisConfig 类添加注解 @EnableCaching2、keyGenerator /** * 自定义缓存的key * @return */ @Bean @Override public KeyGenerator keyGenerator() { return new KeyGenerator(){原创 2021-08-23 09:26:57 · 251 阅读 · 0 评论 -
Spring-boot集成Redis
1、创建SpringBoot 2X 项目2、引入Maven <!-- SpringBoot Boot Redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>原创 2021-08-20 11:22:22 · 94 阅读 · 0 评论