Examples of GroovyMarkupConfig


Examples of org.springframework.web.servlet.view.groovy.GroovyMarkupConfig

  }

  @Test
  public void renderTemplate() throws Exception {
    registerAndRefreshContext();
    GroovyMarkupConfig config = this.context.getBean(GroovyMarkupConfig.class);
    MarkupTemplateEngine engine = config.getTemplateEngine();
    Writer writer = new StringWriter();
    engine.createTemplate(new ClassPathResource("templates/message.tpl").getFile())
        .make(new HashMap<String, Object>(Collections.singletonMap("greeting",
            "Hello World"))).writeTo(writer);
    assertThat(writer.toString(), containsString("Hello World"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.