本文整理汇总了Java中org.thymeleaf.resourceresolver.IResourceResolver类的典型用法代码示例。如果您正苦于以下问题:Java IResourceResolver类的具体用法?Java IResourceResolver怎么用?Java IResourceResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IResourceResolver类属于org.thymeleaf.resourceresolver包,在下文中一共展示了IResourceResolver类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveTemplate
import org.thymeleaf.resourceresolver.IResourceResolver; //导入依赖的package包/类
@Override
public TemplateResolution resolveTemplate(final TemplateProcessingParameters tpp) {
String templateName = "CustomTemplate";
String resourceName = "CustomResource";
IResourceResolver resourceResolver = new FixedMemoryResourceResolver(templateContent);
ITemplateResolutionValidity validity = new NonCacheableTemplateResolutionValidity();
return new TemplateResolution(templateName, resourceName, resourceResolver, StandardCharsets.UTF_8.toString(),
templateMode, validity);
}
示例2: setResourceResolver
import org.thymeleaf.resourceresolver.IResourceResolver; //导入依赖的package包/类
@Override
public void setResourceResolver(IResourceResolver resourceResolver) {
throw new ConfigurationException(
"Cannot set a resource resolver on " + this.getClass().getName() + ". If " +
"you want to set your own resource resolver, use " + TemplateResolver.class.getName() +
"instead");
}
示例3: computeResourceResolver
import org.thymeleaf.resourceresolver.IResourceResolver; //导入依赖的package包/类
@Override
protected IResourceResolver computeResourceResolver(TemplateProcessingParameters templateProcessingParameters)
{
return new FileResourceResolver();
}