コード例 #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";
 }