Class SpringResourceTemplateResource
Object
org.thymeleaf.spring6.templateresource.SpringResourceTemplateResource
- All Implemented Interfaces:
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)
.
- Since:
- 3.0.3
- Author:
- Daniel Fernández
-
Constructor Summary
ConstructorDescriptionSpringResourceTemplateResource
(org.springframework.context.ApplicationContext applicationContext, String location, String characterEncoding) SpringResourceTemplateResource
(org.springframework.core.io.Resource resource, String characterEncoding) -
Method Summary
-
Constructor Details
-
SpringResourceTemplateResource
-
SpringResourceTemplateResource
public SpringResourceTemplateResource(org.springframework.core.io.Resource resource, String characterEncoding)
-
-
Method Details
-
getDescription
- Specified by:
getDescription
in interfaceITemplateResource
-
getBaseName
- Specified by:
getBaseName
in interfaceITemplateResource
-
exists
public boolean exists()- Specified by:
exists
in interfaceITemplateResource
-
reader
- Specified by:
reader
in interfaceITemplateResource
- Throws:
IOException
-
relative
- Specified by:
relative
in interfaceITemplateResource
-