Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
src enable thymeleaf-extras-java8time (#63) (#65) Aug 2, 2017
LICENSE thymeleaf Sep 16, 2015
README.md thymeleaf Sep 16, 2015
pom.xml thymeleaf pom -> 2.7.1 Nov 14, 2017

README.md

spark-template-thymeleaf

Spark templating system using thymeleaf

import java.util.HashMap;
import java.util.Map;

import spark.ModelAndView;

import static spark.Spark.get;

/**
 * Thymeleaf template engine example
 */
public class ThymeleafTemplateExample {
    public static void main(String[] args) {
        Map map = new HashMap();
        map.put("name", "Sam");

        // hello.html file is in resources/templates directory
        get("/hello", (rq, rs) -> new ModelAndView(map, "hello"), new ThymeleafTemplateEngine());
    }
}