public class StandardTemplateResourceResolver extends Object implements TemplateResourceResolver
TemplateResourceResolver
.
Templates are resolved by first looking for a resource on the classpath named
org/springframework/restdocs/templates/{name}.snippet
. If no such
resource exists default-
is prepended to the name and the classpath is checked
again. The built-in snippet templates are all named default- name
, thereby
allowing them to be overridden.
Constructor and Description |
---|
StandardTemplateResourceResolver() |
Modifier and Type | Method and Description |
---|---|
Resource |
resolveTemplateResource(String name)
Resolves a
Resource for the template with the given name . |
public Resource resolveTemplateResource(String name)
TemplateResourceResolver
Resource
for the template with the given name
.resolveTemplateResource
in interface TemplateResourceResolver
name
- the name of the templateResource
from which the template can be read