public final class SpringResourceTemplateResource extends Object implements org.thymeleaf.templateresource.ITemplateResource
Implementation of ITemplateResource
that resolves
resources by delegating on Spring's resource resolution mechanism, implemented by the
ResourceLoader
interface.
This resource resolver accesses the Spring resource resolution mechanism by means of
calls to ResourceLoader.getResource(String)
.
Constructor and Description |
---|
SpringResourceTemplateResource(org.springframework.context.ApplicationContext applicationContext,
String location,
String characterEncoding) |
SpringResourceTemplateResource(org.springframework.core.io.Resource resource,
String characterEncoding) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists() |
String |
getBaseName() |
String |
getDescription() |
Reader |
reader() |
org.thymeleaf.templateresource.ITemplateResource |
relative(String relativeLocation) |
public SpringResourceTemplateResource(org.springframework.context.ApplicationContext applicationContext, String location, String characterEncoding)
public SpringResourceTemplateResource(org.springframework.core.io.Resource resource, String characterEncoding)
public String getDescription()
getDescription
in interface org.thymeleaf.templateresource.ITemplateResource
public String getBaseName()
getBaseName
in interface org.thymeleaf.templateresource.ITemplateResource
public boolean exists()
exists
in interface org.thymeleaf.templateresource.ITemplateResource
public Reader reader() throws IOException
reader
in interface org.thymeleaf.templateresource.ITemplateResource
IOException
public org.thymeleaf.templateresource.ITemplateResource relative(String relativeLocation)
relative
in interface org.thymeleaf.templateresource.ITemplateResource
Copyright © 2016 The THYMELEAF team. All rights reserved.