package cn.iocoder.yudao.framework.i18n.config;

import cn.iocoder.yudao.framework.i18n.core.LocaleFilter;
import cn.iocoder.yudao.framework.i18n.core.LocaleInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;

/**
 * @author Admin
 */
@Slf4j
@Configuration
public class LocaleAutoConfiguration {
    @Bean
    public LocaleFilter localeFilter() {
        return new LocaleFilter();
    }

    @Bean
    public LocaleInterceptor localeInterceptor() {
        return new LocaleInterceptor();
    }

    @Bean
    public SessionLocaleResolver localeResolver() {
        return new SessionLocaleResolver();
    }
}
