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}")
pri
springboot+redis 配置多个dbIndex 遇到Cannot get Jedis connection的问题
最新推荐文章于 2024-06-12 18:27:29 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)