fix:增加错误未维护提示

This commit is contained in:
miguannan
2026-07-31 08:56:26 +07:00
parent 8cd636ef8c
commit b0c574959f

View File

@@ -8,12 +8,14 @@ import org.springframework.context.i18n.LocaleContextHolder;
public class LangProcess {
private static final String DEFAULT_MESSAGE = "请维护此异常";
public static String msg(String code,String...args){
MessageSource bean = SpringContextHolder.getBean(MessageSource.class);
if (StringUtils.isEmpty(code)){
return " ";
}
String message = bean.getMessage(code, args, LocaleContextHolder.getLocale());
String message = bean.getMessage(code, args, DEFAULT_MESSAGE, LocaleContextHolder.getLocale());
return message;
}
}