Package org.bremersee.thymeleaf
Class AdditionalThymeleafAutoConfiguration
- java.lang.Object
-
- org.bremersee.thymeleaf.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 Summary
Constructors Constructor Description AdditionalThymeleafAutoConfiguration(AdditionalThymeleafProperties properties, org.springframework.beans.factory.ObjectProvider<org.thymeleaf.TemplateEngine> templateEngine)
Instantiates a new additional thymeleaf auto configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.thymeleaf.templateresolver.ITemplateResolver
buildTemplateResolver(AdditionalThymeleafProperties.ResolverProperties resolverProperties, int index)
Build template resolver.void
registerTemplateResolver()
Register template resolver.void
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Sets resource loader.
-
-
-
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 propertiestemplateEngine
- 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 propertiesindex
- the index- Returns:
- the template resolver
-
-