From a33898c2a0374c249862a2b996e33352e30c8caf Mon Sep 17 00:00:00 2001 From: KonBAI <1527468660@qq.com> Date: 星期六, 02 四月 2022 13:02:56 +0800 Subject: [PATCH] !167 update 修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型 * fix 修改 postgres sql脚本,处理角色表字段类型错误问题。 * fix 修复postgreSQL新增或更新角色信息报错。修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型。 --- 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