Package org.thymeleaf.templateresolver

Examples of org.thymeleaf.templateresolver.ITemplateResolver


        this.messageResolver = messageResolver;
    }
   
    public String processTemplateCode(final String code) {
        Validate.notNull(code, "Code must be non-null");
        ITemplateResolver templateResolver = new MemoryTemplateResolver(code, templateMode);
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setMessageResolver(messageResolver);
        templateEngine.setTemplateResolver(templateResolver);
        templateEngine.initialize();
        return templateEngine.process(TEMPLATE_NAME, context);
View Full Code Here


        "spring.thymeleaf.encoding:UTF-16");
    this.context.register(ThymeleafAutoConfiguration.class,
        PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    this.context.getBean(TemplateEngine.class).initialize();
    ITemplateResolver resolver = this.context.getBean(ITemplateResolver.class);
    assertTrue(resolver instanceof TemplateResolver);
    assertEquals("UTF-16", ((TemplateResolver) resolver).getCharacterEncoding());
    ThymeleafViewResolver views = this.context.getBean(ThymeleafViewResolver.class);
    assertEquals("UTF-16", views.getCharacterEncoding());
    assertEquals("text/html;charset=UTF-16", views.getContentType());
View Full Code Here

TOP

Related Classes of org.thymeleaf.templateresolver.ITemplateResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.