@@ -0,0 +1,997 @@
+package vn.fjs.live.utils;%0A%0Aimport java.util.Locale;%0A%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.support.ResourceBundleMessageSource;%0A%0Aimport vn.fjs.live.common.DBConstants;%0A%0Apublic class MessageUtils %7B%0A%0A%09/**%0A%09 * Read file message.properties%0A%09 * @return%0A%09 */%0A%09@Bean%0A%09public static ResourceBundleMessageSource messageSource() %7B%0A%09%09ResourceBundleMessageSource source = new ResourceBundleMessageSource();%0A%09%09source.setBasename(%22META-INF/i18n/messages%22);%0A%09%09source.setUseCodeAsDefaultMessage(true);%0A%09%09return source;%0A%09%7D%0A%0A%09/**%0A%09 * Get message WITHOUT param%0A%09 * @param messageKey%0A%09 * @return message%0A%09 */%0A%09public static String getMessage(String messageKey) %7B%0A%09%09return getMessage(messageKey, DBConstants.EMPTY);%0A%09%7D%0A%0A%09/**%0A%09 * Get message WITH param%0A%09 * @param messegeKey%0A%09 * @param params%0A%09 * @return message%0A%09 */%0A%09public static String getMessage(String messegeKey, String... params) %7B%0A%09%09return messageSource().getMessage(messegeKey, params, Locale.JAPANESE);%0A%09%7D%0A%7D%0A

Create messageUtils.java