| | |
| | | private String password; |
| | | |
| | | @Value("${spring.redis.block-when-exhausted}") |
| | | private boolean blockWhenExhausted; |
| | | private boolean blockWhenExhausted; |
| | | |
| | | @Bean |
| | | public JedisPool redisPoolFactory() throws Exception{ |
| | | public JedisPool redisPoolFactory() throws Exception { |
| | | JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); |
| | | jedisPoolConfig.setMaxIdle(maxIdle); |
| | | jedisPoolConfig.setMinIdle(minIdle); |
| | |
| | | // 是否启用pool的jmx管理功能, 默认true |
| | | //Enable JMX management for pool, default is set to true. |
| | | jedisPoolConfig.setJmxEnabled(true); |
| | | JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout, password); |
| | | JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout, "playPai2026test"); |
| | | return jedisPool; |
| | | } |
| | | } |