redis分布式锁-redisson
定义连接池 package cn.cao.config ; import org.redisson.Redisson ; import org.redisson.api.RedissonClient ; import org.redisson.config.Config ; import org.springframework.beans.factory.annotation. Value ; import org.springframework.context.annotation. Bean ; import org.springframework.context.annotation. Configuration ; /** * redisson 配置类 * Created on 2020/11/01 */ @Configuration public class RedissonConfig { @Value ( "${spring.redis.host}" ) private String host ; @Value ( "${spring.redis.port}" ) private String port ; @Value ( "${spring.redis.password}" ) private String password ; @Bean public