package com.xinelu.framework.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.integration.redis.util.RedisLockRegistry;

/**
 * @Description Redis分布式锁配置
 * @Author 纪寒
 * @Date 2022-10-26 15:27:41
 * @Version 1.0
 */
@Configuration
public class RedisDistributedLockUtilsConfig {

    @Bean
    public RedisLockRegistry redisLockRegistry(RedisConnectionFactory redisConnectionFactory) {
        return new RedisLockRegistry(redisConnectionFactory, this.getClass().getName());
    }
}
