org.thymeleaf.spring3.templateresolver
Class SpringResourceTemplateResolver

Object
  extended by org.thymeleaf.templateresolver.AbstractTemplateResolver
      extended by org.thymeleaf.templateresolver.TemplateResolver
          extended by org.thymeleaf.spring3.templateresolver.SpringResourceTemplateResolver
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.thymeleaf.templateresolver.ITemplateResolver

public class SpringResourceTemplateResolver
extends org.thymeleaf.templateresolver.TemplateResolver
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean

Implementation of ITemplateResolver that extends TemplateResolver and uses a SpringResourceResourceResolver for resource resolution.

Since:
2.1.0
Author:
Daniel Fernández

Field Summary
 
Fields inherited from class org.thymeleaf.templateresolver.TemplateResolver
DEFAULT_CACHE_TTL_MS, DEFAULT_CACHEABLE, DEFAULT_TEMPLATE_MODE
 
Constructor Summary
SpringResourceTemplateResolver()
           
 
Method Summary
 void afterPropertiesSet()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setResourceResolver(org.thymeleaf.resourceresolver.IResourceResolver resourceResolver)
           This method should not be called, because the resource resolver is fixed to be SpringResourceResourceResolver.
 
Methods inherited from class org.thymeleaf.templateresolver.TemplateResolver
addTemplateAlias, clearTemplateAliases, computeCharacterEncoding, computeResourceName, computeResourceResolver, computeTemplateMode, computeValidity, getCacheablePatterns, getCacheablePatternSpec, getCacheTTLMs, getCharacterEncoding, getHtml5TemplateModePatterns, getHtml5TemplateModePatternSpec, getLegacyHtml5TemplateModePatterns, getLegacyHtml5TemplateModePatternSpec, getNonCacheablePatterns, getNonCacheablePatternSpec, getPrefix, getResourceResolver, getSuffix, getTemplateAliases, getTemplateMode, getValidXhtmlTemplateModePatterns, getValidXhtmlTemplateModePatternSpec, getValidXmlTemplateModePatterns, getValidXmlTemplateModePatternSpec, getXhtmlTemplateModePatterns, getXhtmlTemplateModePatternSpec, getXmlTemplateModePatterns, getXmlTemplateModePatternSpec, initializeSpecific, initializeSpecificAdditional, isCacheable, setCacheable, setCacheablePatterns, setCacheTTLMs, setCharacterEncoding, setHtml5TemplateModePatterns, setLegacyHtml5TemplateModePatterns, setNonCacheablePatterns, setPrefix, setSuffix, setTemplateAliases, setTemplateMode, setValidXhtmlTemplateModePatterns, setValidXmlTemplateModePatterns, setXhtmlTemplateModePatterns, setXmlTemplateModePatterns, unsafeGetCacheTTLMs, unsafeGetCharacterEncoding, unsafeGetPrefix, unsafeGetResourceResolver, unsafeGetSuffix, unsafeGetTemplateMode, unsafeIsCacheable
 
Methods inherited from class org.thymeleaf.templateresolver.AbstractTemplateResolver
checkInitialized, checkNotInitialized, computeResolvable, getName, getOrder, getResolvablePatterns, getResolvablePatternSpec, initialize, isInitialized, resolveTemplate, setName, setOrder, setResolvablePatterns, unsafeGetName, unsafeGetOrder
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringResourceTemplateResolver

public SpringResourceTemplateResolver()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

setResourceResolver

public void setResourceResolver(org.thymeleaf.resourceresolver.IResourceResolver resourceResolver)

This method should not be called, because the resource resolver is fixed to be SpringResourceResourceResolver. Every execution of this method will result in an exception.

If you need to select a different resource resolver, use the TemplateResolver class instead.

Overrides:
setResourceResolver in class org.thymeleaf.templateresolver.TemplateResolver
Parameters:
resourceResolver - the new resource resolver


Copyright © 2013 The THYMELEAF team. All Rights Reserved.