update locale

pull/485/MERGE
RuoYi 2024-03-13 17:09:00 +08:00
parent 82a0eaed4a
commit 85cf318a94
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
package com.ruoyi.common.utils;
import org.springframework.context.MessageSource;
import com.ruoyi.common.constant.Constants;
import org.springframework.context.i18n.LocaleContextHolder;
import com.ruoyi.common.utils.spring.SpringUtils;
/**
@ -21,6 +21,6 @@ public class MessageUtils
public static String message(String code, Object... args)
{
MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
return messageSource.getMessage(code, args, Constants.DEFAULT_LOCALE);
return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
}
}