Skip to content

Instantly share code, notes, and snippets.

@taywils
Created November 14, 2013 07:04
Show Gist options
  • Save taywils/7462642 to your computer and use it in GitHub Desktop.
Save taywils/7462642 to your computer and use it in GitHub Desktop.
spark_view_step_1_2
get(new FreeMarkerRoute("/freemarker") {
@Override
public ModelAndView handle(Request request, Response response) {
Map<String, Object> attributes = new HashMap<String, Object>();
attributes.put("blogTitle", "Spark Blog!");
attributes.put("descriptionTitle", "We're using Twitter Bootstrap 3");
attributes.put("descriptionBody1", "Special thanks to Twitter for being so dang awesome and helping us");
attributes.put("descriptionBody2", "No seriously... the web would be so ugly without Bootstrap");
// Place the freemarker template within src/test/resources/spark/template/freemarker
return modelAndView(attributes, "layout.ftl");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment