BAEL-982 - reusing model
This commit is contained in:
parent
d4d0305f3e
commit
5f59a1b245
|
@ -22,10 +22,9 @@ public class ArticleController {
|
|||
.mapToObj(i -> generateArticle("Article Title " + i))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Map<String, Object> modelMap = new HashMap<>();
|
||||
modelMap.put("articles", articles);
|
||||
model.put("articles", articles);
|
||||
|
||||
return new ModelAndView("index", modelMap);
|
||||
return new ModelAndView("index", model);
|
||||
}
|
||||
|
||||
private Article generateArticle(String title) {
|
||||
|
|
Loading…
Reference in New Issue