@RequestMapping(value = "/add", method = RequestMethod.GET) public ModelAndView addEmployee( @ModelAttribute("command") EmployeeBean employeeBean, BindingResult result) { Map<String, Object> model = new HashMap<String, Object>(); model.put("employees", prepareListofBean(employeeService.listEmployeess())); return new ModelAndView("addEmployee", model); }
@RequestMapping(value = "/employees", method = RequestMethod.GET) public ModelAndView listEmployees() { Map<String, Object> model = new HashMap<String, Object>(); model.put("employees", prepareListofBean(employeeService.listEmployeess())); return new ModelAndView("employeesList", model); }