|
|
@@ -6,6 +6,8 @@ import org.springframework.context.MessageSource;
|
|
|
import org.springframework.context.NoSuchMessageException;
|
|
|
import org.springframework.context.i18n.LocaleContextHolder;
|
|
|
|
|
|
+import java.util.Locale;
|
|
|
+
|
|
|
/**
|
|
|
* 获取i18n资源文件
|
|
|
*
|
|
|
@@ -25,7 +27,8 @@ public class MessageUtils {
|
|
|
*/
|
|
|
public static String message(String code, Object... args) {
|
|
|
try {
|
|
|
- return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale());
|
|
|
+// return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale());
|
|
|
+ return MESSAGE_SOURCE.getMessage(code, args, Locale.CHINA);
|
|
|
} catch (NoSuchMessageException e) {
|
|
|
return code;
|
|
|
}
|