Class AdditionalThymeleafAutoConfiguration


  • @ConditionalOnClass({org.bremersee.thymeleaf.TemplateResolver.class,org.thymeleaf.TemplateEngine.class})
    @ConditionalOnBean(org.thymeleaf.TemplateEngine.class)
    @AutoConfigureAfter(org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.class)
    @Configuration
    @EnableConfigurationProperties(AdditionalThymeleafProperties.class)
    public class AdditionalThymeleafAutoConfiguration
    extends Object
    The additional thymeleaf auto configuration.
    Author:
    Christian Bremer
    • Constructor Detail

      • AdditionalThymeleafAutoConfiguration

        public AdditionalThymeleafAutoConfiguration​(AdditionalThymeleafProperties properties,
                                                    org.springframework.beans.factory.ObjectProvider<org.thymeleaf.TemplateEngine> templateEngine)
        Instantiates a new additional thymeleaf auto configuration.
        Parameters:
        properties - the properties
        templateEngine - the template engine
    • Method Detail

      • setResourceLoader

        public void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)
        Sets resource loader.
        Parameters:
        resourceLoader - the resource loader
      • registerTemplateResolver

        @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class)
        public void registerTemplateResolver()
        Register template resolver.
      • buildTemplateResolver

        protected org.thymeleaf.templateresolver.ITemplateResolver buildTemplateResolver​(AdditionalThymeleafProperties.ResolverProperties resolverProperties,
                                                                                         int index)
        Build template resolver.
        Parameters:
        resolverProperties - the resolver properties
        index - the index
        Returns:
        the template resolver