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.ITemplateResourcepublic String getBaseName()
getBaseName in interface org.thymeleaf.templateresource.ITemplateResourcepublic boolean exists()
exists in interface org.thymeleaf.templateresource.ITemplateResourcepublic Reader reader() throws IOException
reader in interface org.thymeleaf.templateresource.ITemplateResourceIOExceptionpublic org.thymeleaf.templateresource.ITemplateResource relative(String relativeLocation)
relative in interface org.thymeleaf.templateresource.ITemplateResourceCopyright © 2017 The THYMELEAF team. All rights reserved.