package com.xunhong.erp.turbo.lock.config;

import com.xunhong.erp.turbo.lock.DistributeLockAspect;
import org.redisson.api.RedissonClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Hollis
 */
@Configuration
public class DistributeLockConfiguration {

	@Bean
	@ConditionalOnMissingBean
	public DistributeLockAspect distributeLockAspect(RedissonClient redisson) {
		return new DistributeLockAspect(redisson);
	}
}
