use of org.thymeleaf.templateparser.EntityResolver in project thymeleaf-tests by thymeleaf.
the class AbstractDocumentProcessingTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
this.templateEngine = new TemplateEngine();
TemplateResolver templateResolver = new ClassLoaderTemplateResolver();
templateResolver.setSuffix(".html");
this.templateEngine.setTemplateResolver(templateResolver);
this.templateEngine.initialize();
this.context = new Context();
XPathFactory xPathFactory = XPathFactory.newInstance();
this.xPath = xPathFactory.newXPath();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
this.docBuilder = factory.newDocumentBuilder();
this.docBuilder.setEntityResolver(new EntityResolver(this.templateEngine.getConfiguration()));
}
Aggregations