package com.fzm.mall.server.front.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;

/**
 * @author lyz
 * @mail lyz@disanbo.com
 * @create 2021/1/25 15:54
 * @description 自定义的BEAN覆盖默认BEAN
 */
@Configuration
public class MallDefaultBeanRedfineConfiguration {

    /**
     * @descprition 用自定义的MallLocaleResolver覆盖默认AcceptHeaderLocaleResolver，不可以直接在MallLocaleResolver加@Component
     * @author lyz
     * @create 2021/1/25 16:00
     */
    @Bean
    LocaleResolver localeResolver(){
        return new MallLocaleResolver();
    }
}
