随笔分类 - 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.
阅读全文
摘要:Long len = redisTemplate.opsForList().size(CacheConstants.CACHE_LOG_LIST); if (len != null && len > 0) { long i = len / 1000 + 1; while (i > 0) { List
阅读全文
摘要: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
阅读全文
摘要:import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.geo.*; import org.springframework.data.redis.connection
阅读全文
摘要:redis-cli -h 192.168.3.4 -a 123456 keys user:id:* | xargs redis-cli -h 192.168.3.4 -a 123456 del
阅读全文
摘要:我用的2.6.0版本 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> </dependency> import org.apache.commons.pool2.imp
阅读全文
摘要:@Bean LettuceConnectionFactory lettuceConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfigurati
阅读全文
摘要:@Bean JedisConnectionFactory jedisConnectionFactory() { RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration (
阅读全文
摘要:这样配置多个, @Bean(name = “redisKeyDatabase”)别设置一样就行 package cc.aaa.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.ja
阅读全文
摘要:redis多数据源 import cc.datebook.common.JsonResult; import cc.datebook.entity.BookInfo; import cc.datebook.enums.ResultCode; import cc.datebook.service.Bo
阅读全文
摘要:由于还使用elasticsearch,所以使用jedis没有使用lettuce 1.pom引入 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</a
阅读全文

浙公网安备 33010602011771号