随笔分类 -  redis

摘要:# redis settings spring.redis.database=0 spring.redis.host=127.0.0.1 spring.redis.port=6379 spring.redis.password= spring.redis.timeout=5000ms spring. 阅读全文
posted @ 2022-10-11 17:03 qwer78 阅读(46) 评论(0) 推荐(0)
摘要:Long len = redisTemplate.opsForList().size(CacheConstants.CACHE_LOG_LIST); if (len != null && len > 0) { long i = len / 1000 + 1; while (i > 0) { List 阅读全文
posted @ 2021-10-18 15:51 qwer78 阅读(408) 评论(0) 推荐(0)
摘要:spring.redis.common.database.index=0 spring.redis.common.lettuce.pool.min-idle=0 spring.redis.common.lettuce.pool.max-idle=8 spring.redis.common.lettu 阅读全文
posted @ 2020-05-07 09:08 qwer78 阅读(52) 评论(0) 推荐(0)
摘要:import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.geo.*; import org.springframework.data.redis.connection 阅读全文
posted @ 2019-10-21 10:15 qwer78 阅读(28) 评论(0) 推荐(0)
摘要:redis-cli -h 192.168.3.4 -a 123456 keys user:id:* | xargs redis-cli -h 192.168.3.4 -a 123456 del 阅读全文
posted @ 2019-05-15 17:05 qwer78 阅读(88) 评论(0) 推荐(0)
摘要:我用的2.6.0版本 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> </dependency> import org.apache.commons.pool2.imp 阅读全文
posted @ 2018-08-16 10:25 qwer78 阅读(163) 评论(0) 推荐(0)
摘要:@Bean LettuceConnectionFactory lettuceConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfigurati 阅读全文
posted @ 2018-08-13 14:54 qwer78 阅读(2542) 评论(0) 推荐(0)
摘要:@Bean JedisConnectionFactory jedisConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration ( 阅读全文
posted @ 2018-06-26 17:26 qwer78 阅读(350) 评论(0) 推荐(0)
摘要:这样配置多个, @Bean(name = “redisKeyDatabase”)别设置一样就行 package cc.aaa.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.ja 阅读全文
posted @ 2018-05-14 16:46 qwer78 阅读(43) 评论(0) 推荐(0)
摘要:redis多数据源 import cc.datebook.common.JsonResult; import cc.datebook.entity.BookInfo; import cc.datebook.enums.ResultCode; import cc.datebook.service.Bo 阅读全文
posted @ 2018-04-23 16:45 qwer78 阅读(378) 评论(0) 推荐(0)
摘要:由于还使用elasticsearch,所以使用jedis没有使用lettuce 1.pom引入 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</a 阅读全文
posted @ 2018-03-20 15:57 qwer78 阅读(30) 评论(0) 推荐(0)