Find file History
Latest commit 64ab139 Nov 5, 2016 @tipsy tipsy Update jtwig engine
Permalink
..
Failed to load latest commit information.
src Update jtwig engine Nov 5, 2016
LICENSE Fixes for #5 Sep 16, 2015
README.md fixed readmes Sep 16, 2015
pom.xml Update jetbrick engine Nov 5, 2016

README.md

spark-template-jetbrick

How to use the Jetbrick-Template route for Spark example:

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

import spark.ModelAndView;
import spark.template.jetbrick.JetbrickTemplateEngine;

import static spark.Spark.get;

/**
 * spark-template-jetbrick example
 */
public class JetbrickTemplateExample {

    public static void main(String[] args) {

        get("/", (request, response) -> {
            Map<String, Object> model = new HashMap<>();

            model.put("target", "spark-template-jetbrick");

            return new ModelAndView(model, "template/hello.jetx");
        }, new JetbrickTemplateEngine());

    }

}

Jetbrick-Template refer:https://github.com/subchen/jetbrick-template-2x