@@ -0,0 +1,1496 @@
+/*%0A * Copyright (C) 2008 feilong%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.feilong.spring.messagesource;%0A%0Aimport org.apache.commons.lang3.Validate;%0Aimport org.springframework.context.MessageSource;%0Aimport org.springframework.context.i18n.LocaleContextHolder;%0A%0A/**%0A * The Class MessageSourceUtil.%0A *%0A * @author %3Ca href=%22http://feitianbenyue.iteye.com/%22%3Efeilong%3C/a%3E%0A * @since 1.11.1%0A */%0Apublic class MessageSourceUtil%7B%0A%0A    /**%0A     * %E8%8E%B7%E5%BE%97%E6%B6%88%E6%81%AF%E4%BF%A1%E6%81%AF.%0A     *%0A     * @param messageSource%0A     *            the message source%0A     * @param code%0A     *            the code%0A     * @param args%0A     *            the args%0A     * @return %E5%A6%82%E6%9E%9C %3Ccode%3EmessageSource%3C/code%3E %E6%98%AFnull,%E6%8A%9B%E5%87%BA %7B@link NullPointerException%7D%3Cbr%3E%0A     */%0A    public static String getMessage(MessageSource messageSource,String code,Object...args)%7B%0A        Validate.notNull(messageSource, %22messageSource can't be null!%22);%0A        return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());%0A    %7D%0A%0A%7D%0A

add MessageSourceUtil fix #39