@@ -661,7 +661,7 @@ public String getMessage(String code, @Nullable List<?> args, String defaultMess
661
661
* @return the message
662
662
*/
663
663
public String getMessage (String code , @ Nullable Object [] args , String defaultMessage , boolean htmlEscape ) {
664
- String msg = this . webApplicationContext .getMessage (code , args , defaultMessage , getLocale ());
664
+ String msg = getMessageSource () .getMessage (code , args , defaultMessage , getLocale ());
665
665
if (msg == null ) {
666
666
return "" ;
667
667
}
@@ -709,7 +709,7 @@ public String getMessage(String code, @Nullable List<?> args) throws NoSuchMessa
709
709
* @throws org.springframework.context.NoSuchMessageException if not found
710
710
*/
711
711
public String getMessage (String code , @ Nullable Object [] args , boolean htmlEscape ) throws NoSuchMessageException {
712
- String msg = this . webApplicationContext .getMessage (code , args , getLocale ());
712
+ String msg = getMessageSource () .getMessage (code , args , getLocale ());
713
713
return (htmlEscape ? HtmlUtils .htmlEscape (msg ) : msg );
714
714
}
715
715
@@ -731,7 +731,7 @@ public String getMessage(MessageSourceResolvable resolvable) throws NoSuchMessag
731
731
* @throws org.springframework.context.NoSuchMessageException if not found
732
732
*/
733
733
public String getMessage (MessageSourceResolvable resolvable , boolean htmlEscape ) throws NoSuchMessageException {
734
- String msg = this . webApplicationContext .getMessage (resolvable , getLocale ());
734
+ String msg = getMessageSource () .getMessage (resolvable , getLocale ());
735
735
return (htmlEscape ? HtmlUtils .htmlEscape (msg ) : msg );
736
736
}
737
737
0 commit comments