一个项目使用不同服务器的Redis
1,在配置文件中添加配置文件
#redis2
spring.redisbatch.host=127.0.0.1
spring.redisbatch.port=6379
spring.redisbatch.password=
spring.redisbatch.lettuce.pool.max-active=50
spring.redisbatch.lettuce.pool.max-idle=50
spring.redisbatch.lettuce.pool.min-idle=1
spring.redisbatch.lettuce.pool.max-wait=50000
spring.redisbatch.timeout=60000
2.添加配置类
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springfr