예제 #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";
 }
예제 #2
0
 @RequestMapping(value = "/admin/clean", method = RequestMethod.GET)
 public String clean(Model model) {
   populator.cleanDb();
   return "movies/list";
 }