Class SpringResourceTemplateResolver
Object
org.thymeleaf.templateresolver.AbstractTemplateResolver
org.thymeleaf.templateresolver.AbstractConfigurableTemplateResolver
org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,ITemplateResolver
public class SpringResourceTemplateResolver
extends AbstractConfigurableTemplateResolver
implements org.springframework.context.ApplicationContextAware
Implementation of ITemplateResolver
that extends
AbstractConfigurableTemplateResolver
and resolves templates using Spring's Resource Resolution mechanism
(see ResourceLoader.getResource(String)
).
- Since:
- 3.0.3
- Author:
- Daniel Fernández
-
Field Summary
Fields inherited from class org.thymeleaf.templateresolver.AbstractConfigurableTemplateResolver
DEFAULT_CACHE_TTL_MS, DEFAULT_CACHEABLE, DEFAULT_TEMPLATE_MODE
Fields inherited from class org.thymeleaf.templateresolver.AbstractTemplateResolver
DEFAULT_EXISTENCE_CHECK, DEFAULT_USE_DECOUPLED_LOGIC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ITemplateResource
computeTemplateResource
(IEngineConfiguration configuration, String ownerTemplate, String template, String resourceName, String characterEncoding, Map<String, Object> templateResolutionAttributes) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class org.thymeleaf.templateresolver.AbstractConfigurableTemplateResolver
addTemplateAlias, clearTemplateAliases, computeResourceName, computeTemplateMode, computeTemplateResource, computeValidity, getCacheablePatterns, getCacheablePatternSpec, getCacheTTLMs, getCharacterEncoding, getCSSTemplateModePatterns, getCSSTemplateModePatternSpec, getForceSuffix, getForceTemplateMode, getHtmlTemplateModePatterns, getHtmlTemplateModePatternSpec, getJavaScriptTemplateModePatterns, getJavaScriptTemplateModePatternSpec, getNonCacheablePatterns, getNonCacheablePatternSpec, getPrefix, getRawTemplateModePatterns, getRawTemplateModePatternSpec, getSuffix, getTemplateAliases, getTemplateMode, getTextTemplateModePatterns, getTextTemplateModePatternSpec, getXmlTemplateModePatterns, getXmlTemplateModePatternSpec, isCacheable, setCacheable, setCacheablePatterns, setCacheTTLMs, setCharacterEncoding, setCSSTemplateModePatterns, setForceSuffix, setForceTemplateMode, setHtmlTemplateModePatterns, setJavaScriptTemplateModePatterns, setNonCacheablePatterns, setPrefix, setRawTemplateModePatterns, setSuffix, setTemplateAliases, setTemplateMode, setTemplateMode, setTextTemplateModePatterns, setXmlTemplateModePatterns
Methods inherited from class org.thymeleaf.templateresolver.AbstractTemplateResolver
computeResolvable, getCheckExistence, getName, getOrder, getResolvablePatterns, getResolvablePatternSpec, getUseDecoupledLogic, resolveTemplate, setCheckExistence, setName, setOrder, setResolvablePatterns, setUseDecoupledLogic
-
Constructor Details
-
SpringResourceTemplateResolver
public SpringResourceTemplateResolver()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
computeTemplateResource
protected ITemplateResource computeTemplateResource(IEngineConfiguration configuration, String ownerTemplate, String template, String resourceName, String characterEncoding, Map<String, Object> templateResolutionAttributes) - Specified by:
computeTemplateResource
in classAbstractConfigurableTemplateResolver
-