package com.xunhong.erp.turbo.limiter.configuration;

import com.xunhong.erp.turbo.limiter.SlidingWindowRateLimiter;
import org.redisson.api.RedissonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author shenyifei
 */
@Configuration
public class RateLimiterConfiguration {

	@Bean
	public SlidingWindowRateLimiter slidingWindowRateLimiter(RedissonClient redisson) {
		return new SlidingWindowRateLimiter(redisson);
	}
}
