How can I access the messages from a resource bundle in Spring MVC inside a class that extends from AbstractController
?
I have tried getMessageSourceAccessor().getMessage("a.message");
but it it throws this Exception:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.context.NoSuchMessageException: No message found under code 'a.message' for locale 'en'.
When I do the same inside a jsp it works
<spring:message code="a.message"/>