From 0358dc233a46363d7864d882e0146e56d10ffb27 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 21 十月 2022 13:02:52 +0800 Subject: [PATCH] update springboot 2.7.4 => 2.7.5 update springboot-admin 2.7.5 => 2.7.6 update springdoc 1.6.11 => 1.6.12 update poi 5.2.2 => 5.2.3 update hutool 5.8.7=>5.8.8 update aws-s3 1.12.300 => 1.12.324 update aliyun-sms 2.0.18 => 2.0.22 update tencent-sms 3.1.591 => 3.1.611 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/I18nConfig.java | 46 ++++++++++++++++++++++------------------------ 1 files changed, 22 insertions(+), 24 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/I18nConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/I18nConfig.java index 48b341b..e64fa3a 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/I18nConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/I18nConfig.java @@ -1,7 +1,6 @@ package com.ruoyi.framework.config; import cn.hutool.core.util.StrUtil; -import org.jetbrains.annotations.NotNull; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.LocaleResolver; @@ -18,31 +17,30 @@ @Configuration public class I18nConfig { - @Bean - public LocaleResolver localeResolver() { - return new I18nLocaleResolver(); - } + @Bean + public LocaleResolver localeResolver() { + return new I18nLocaleResolver(); + } - /** - * 鑾峰彇璇锋眰澶村浗闄呭寲淇℃伅 - */ - static class I18nLocaleResolver implements LocaleResolver { + /** + * 鑾峰彇璇锋眰澶村浗闄呭寲淇℃伅 + */ + static class I18nLocaleResolver implements LocaleResolver { - @NotNull - @Override - public Locale resolveLocale(HttpServletRequest httpServletRequest) { - String language = httpServletRequest.getHeader("content-language"); - Locale locale = Locale.getDefault(); - if (StrUtil.isNotBlank(language)) { - String[] split = language.split("_"); - locale = new Locale(split[0], split[1]); - } - return locale; - } + @Override + public Locale resolveLocale(HttpServletRequest httpServletRequest) { + String language = httpServletRequest.getHeader("content-language"); + Locale locale = Locale.getDefault(); + if (StrUtil.isNotBlank(language)) { + String[] split = language.split("_"); + locale = new Locale(split[0], split[1]); + } + return locale; + } - @Override - public void setLocale(@NotNull HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Locale locale) { + @Override + public void setLocale(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Locale locale) { - } - } + } + } } -- Gitblit v1.9.3