yangys
2025-11-05 10c5247722995e571b3fd4dbffb178964a9bd6ee
1
2
3
4
5
6
7
8
9
10
11
12
package com.qianwen.smartman.common.utils;
 
import com.qianwen.core.tool.utils.SpringUtil;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
 
public class MessageUtils {
    public static String message(String code, Object... args) {
        MessageSource messageSource = (MessageSource) SpringUtil.getBean(MessageSource.class);
        return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
    }
}