Class MjmlThymeleafAutoConfiguration

java.lang.Object
dev.jcputney.mjml.spring.autoconfigure.MjmlThymeleafAutoConfiguration

@Configuration @ConditionalOnClass({org.thymeleaf.TemplateEngine.class,MjmlService.class}) @ConditionalOnProperty(name="spring.mjml.thymeleaf-enabled", havingValue="true", matchIfMissing=true) public class MjmlThymeleafAutoConfiguration extends Object
Auto-configuration for Thymeleaf + MJML integration. Only activates when Thymeleaf is on the classpath.
  • Constructor Details

    • MjmlThymeleafAutoConfiguration

      public MjmlThymeleafAutoConfiguration()
  • Method Details

    • thymeleafMjmlService

      @Bean @ConditionalOnMissingBean public ThymeleafMjmlService thymeleafMjmlService(org.thymeleaf.TemplateEngine templateEngine, MjmlService mjmlService)
      Auto-configures ThymeleafMjmlService when Thymeleaf is available.
      Parameters:
      templateEngine - the Thymeleaf template engine
      mjmlService - the MJML rendering service
      Returns:
      the configured Thymeleaf MJML service