MyLocaleChangeInterceptor.java 674 B

1234567891011121314151617181920212223242526
  1. package com.steerinfo.dil.interceptors;
  2. import org.springframework.context.annotation.Bean;
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.context.support.ReloadableResourceBundleMessageSource;
  5. import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
  6. import org.springframework.web.servlet.i18n.SessionLocaleResolver;
  7. import java.util.Locale;
  8. /**
  9. * @Author zhangnan
  10. * @Date 2021/4/23 8:19
  11. * @Version 1.0
  12. */
  13. @Configuration
  14. public class MyLocaleChangeInterceptor {
  15. //国际化配置
  16. @Bean
  17. public LocaleChangeInterceptor localeChangeInterceptor(){
  18. return new LocaleChangeInterceptor();
  19. }
  20. }