mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、cf-gateway locale透传修复;2、LocaleResolver修改为全局web服务配置;
This commit is contained in:
-10
@@ -3,20 +3,10 @@ package com.cf.imes.module.system.framework.trans.config;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.LocaleResolver;
|
||||
import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(TransProperties.class)
|
||||
public class TransConfiguration {
|
||||
@Bean
|
||||
public LocaleResolver localeResolver() {
|
||||
AcceptHeaderLocaleResolver resolver = new AcceptHeaderLocaleResolver();
|
||||
resolver.setDefaultLocale(Locale.SIMPLIFIED_CHINESE);
|
||||
return resolver;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TransApi transApi(TransProperties transProperties) {
|
||||
|
||||
Reference in New Issue
Block a user