Package io.micronaut.views.thymeleaf
Class MessageSourceMessageResolver
java.lang.Object
org.thymeleaf.messageresolver.AbstractMessageResolver
io.micronaut.views.thymeleaf.MessageSourceMessageResolver
- All Implemented Interfaces:
org.thymeleaf.messageresolver.IMessageResolver
@Singleton
public class MessageSourceMessageResolver
extends org.thymeleaf.messageresolver.AbstractMessageResolver
Resolves messages with the Micronaut MessageSource. Allows Thymeleaf templates to use
Micronaut message properties.
- Since:
- 1.3.0
- Author:
- Nirav Assar
-
Constructor Summary
ConstructorDescriptionMessageSourceMessageResolver
(io.micronaut.context.MessageSource messageSource) Constructor which will initialize the Thymeleaf standard message resolver, and also the message source for Micronaut. -
Method Summary
Modifier and TypeMethodDescriptioncreateAbsentMessageRepresentation
(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters) final String
resolveMessage
(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters) Methods inherited from class org.thymeleaf.messageresolver.AbstractMessageResolver
getName, getOrder, setName, setOrder
-
Constructor Details
-
MessageSourceMessageResolver
public MessageSourceMessageResolver(io.micronaut.context.MessageSource messageSource) Constructor which will initialize the Thymeleaf standard message resolver, and also the message source for Micronaut.- Parameters:
messageSource
- Micronaut message source
-
-
Method Details
-
resolveMessage
-
createAbsentMessageRepresentation
-