我们无法在网络应用程序外部使用宏,例如在我的情况下,因此解决方案是使用messageSource
model.put("messagesource", this.messagesource);// adding this e.g. should do the trickmodel.put("keyHelloCustomer", "the_key_you_use_in_your_properties_file");model.put("noArgs", new Object[]{});model.put("locale", yourOwnPrivateMethodToDetermineWhichLocaleToUse());并在vm中:
${messageSource.getMessage($keyHelloCustomer, $noArgs, $locale)}参考:http :
//forum.springsource.org/showthread.php?t=82018



