import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import redis.clients.jedis.JedisPoolConfig;
@EnableCaching
@Configuration
public class RedisConfig {
@Value("${redis.pool.max-wait}")
private int redisPoolMaxWait;
@Value("${redis.pool.max-idle}")
private int redisPoolMaxIdle;
@Value("${redis.pool.min-idle}")
private int redisPoolMinIdle;
@Value("${redis.dbindex13}")
private int dbIndex13;
@Value("${redis.dbindex14}"
springboot+redis 配置多个dbIndex 遇到Cannot get Jedis connection的问题
最新推荐文章于 2025-06-11 22:59:07 发布