package com.qmth.exam.reserve.config;

import com.qmth.boot.core.rateLimit.service.RateLimitService;
import com.qmth.boot.core.rateLimit.service.impl.MemoryRateLimitService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RateLimiterConfig {

    private static final Logger log = LoggerFactory.getLogger(RateLimiterConfig.class);

    @Bean("rateLimitService")
    public RateLimitService rateLimitService() {
        log.info("memoryRateLimitService init...");
        return new MemoryRateLimitService();
    }

}
