TemplateLoader adapter that loads via a Spring ResourceLoader.
Used by FreeMarkerConfigurationFactory for any resource loader path that cannot
be resolved to a java.io.File .
FreeMarkerConfigurationFactory#setTemplateLoaderPath, freemarker.template.Configuration#setDirectoryForTemplateLoading
| Modifier and Type | Field and Description |
|---|---|
| protected final Log | |
| private final ResourceLoader | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | SpringTemplateLoader(ResourceLoader
the Spring ResourceLoader to use resourceLoader, String the template loader path to use templateLoaderPath)Create a new SpringTemplateLoader. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Object | |
| public long | |
| public Reader |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| resourceLoader | back to summary |
|---|---|
| private final ResourceLoader resourceLoader | |
| templateLoaderPath | back to summary |
|---|---|
| private final String templateLoaderPath | |
| SpringTemplateLoader | back to summary |
|---|---|
| public SpringTemplateLoader(ResourceLoader resourceLoader, String templateLoaderPath) Create a new SpringTemplateLoader.
| |
| closeTemplateSource | back to summary |
|---|---|
public void closeTemplateSource(Object templateSource) throws IOException
| |
| findTemplateSource | back to summary |
|---|---|
| public Object findTemplateSource(String name) throws IOException | |
| getLastModified | back to summary |
|---|---|
public long getLastModified(Object templateSource)
| |
| getReader | back to summary |
|---|---|
public Reader getReader(Object templateSource, String encoding) throws IOException
| |