/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved.
 * <a>http://www.crunii.com</a>
 */
package com.crunii.micro.domain.config;

import com.crunii.micro.platform.components.Locker;
import com.crunii.micro.platform.components.LockerImpl;
import org.redisson.api.RedissonClient;
import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 田平 create 2021/4/2 15:33
 */
@Configuration
@AutoConfigureAfter(RedissonAutoConfiguration.class)
public class LockerConfiguration {

	@Autowired
	private RedissonClient redissonClient;

	@Bean
	public Locker regLocker() {
		return new LockerImpl(redissonClient);
	}
}
