In a .jsp I would use:
<fmt:message key="welcome.title"/>
to display a message from my messages.properties file.
How would I do this with freemarker ?
In a .jsp I would use:
<fmt:message key="welcome.title"/>
to display a message from my messages.properties file.
How would I do this with freemarker ?
@Blankman
No, you don't have to import this manually in each template. You can set an auto_import property in your freemarker settings as showed below.
Others are fine answers. Providing java config as example for those that use that.
Import Spring Macro
Then
But you need to register ResourceBundleMessageSource
Keep in mind MessageSource must be called messageSource