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