Ejemplo n.º 1
0
 // @RequestMapping(value = "/admin/populate", method = RequestMethod.GET)
 @RequestMapping(value = "/populate", method = RequestMethod.GET)
 public String populateDatabase(Model model) {
   Collection<Movie> movies = populator.populateDatabase();
   model.addAttribute("movies", movies);
   addUser(model);
   return "/movies/list";
 }
Ejemplo n.º 2
0
 @RequestMapping(value = "/admin/clean", method = RequestMethod.GET)
 public String clean(Model model) {
   populator.cleanDb();
   return "movies/list";
 }