@@ -10,7 +10,7 @@ Templates are available via javadoc:ModelAndView[] and requires a javadoc:Templa
1010
1111 get("/", ctx -> {
1212 Map<String, Object> model = ...; <2>
13- return new ModelAndModel ("index.html", model); <3>
13+ return new ModelAndView ("index.html", model); <3>
1414 });
1515}
1616----
@@ -23,7 +23,7 @@ Templates are available via javadoc:ModelAndView[] and requires a javadoc:Templa
2323
2424 get("/") { ctx ->
2525 val model = mapOf(...) <2>
26- ModelAndModel ("index.html", model) <3>
26+ ModelAndView ("index.html", model) <3>
2727 }
2828}
2929----
@@ -54,11 +54,11 @@ The file extension allow us to use/mix multiple template engines too:
5454 install(new FreemarkerModule()); <2>
5555
5656 get("/first", ctx -> {
57- return new ModelAndModel ("index.hbs", model); <3>
57+ return new ModelAndView ("index.hbs", model); <3>
5858 });
5959
6060 get("/second", ctx -> {
61- return new ModelAndModel ("index.ftl", model); <4>
61+ return new ModelAndView ("index.ftl", model); <4>
6262 });
6363}
6464----
@@ -71,11 +71,11 @@ The file extension allow us to use/mix multiple template engines too:
7171 install(FreemarkerModule()) <2>
7272
7373 get("/first") { ctx ->
74- ModelAndModel ("index.hbs", model) <3>
74+ ModelAndView ("index.hbs", model) <3>
7575 }
7676
7777 get("/second") { ctx ->
78- ModelAndModel ("index.ftl", model) <4>
78+ ModelAndView ("index.ftl", model) <4>
7979 }
8080}
8181----
0 commit comments