From ba1a540add437649bae209ba8a8b44f2e2d95451 Mon Sep 17 00:00:00 2001 From: dhb52 <dhb52@126.com> Date: 星期五, 24 五月 2024 13:30:51 +0800 Subject: [PATCH] !542 更新SnailJob版本到1.0.0-beta2 * feat: 配置项变更,避免误解snail-job.group-name => snail-job.group * chore: 更新snail-job版本到1.0.0-beta2 --- ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/MessageUtils.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/MessageUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/MessageUtils.java index 6f3729b..48dfc08 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/MessageUtils.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/MessageUtils.java @@ -3,6 +3,7 @@ import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.springframework.context.MessageSource; +import org.springframework.context.NoSuchMessageException; import org.springframework.context.i18n.LocaleContextHolder; /** @@ -23,6 +24,10 @@ * @return 鑾峰彇鍥介檯鍖栫炕璇戝�� */ public static String message(String code, Object... args) { - return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale()); + try { + return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale()); + } catch (NoSuchMessageException e) { + return code; + } } } -- Gitblit v1.9.3