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 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

      public final String resolveMessage(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters)
    • createAbsentMessageRepresentation

      public String createAbsentMessageRepresentation(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters)