コード例 #1
0
  @RequestMapping("/welcome/{name}.do")
  public String welcome2(@PathVariable String name, Model model) {
    List<Employee> employees = demoDao.findEmployee(name);
    model.addAttribute("name", name);
    model.addAttribute("size", employees.size());

    return "welcome";
  }
コード例 #2
0
 @RequestMapping("/welcome.do")
 public void welcome(HttpServletRequest request) {
   //        ModelAndView view = new ModelAndView("");
   request.setAttribute("name", "A san, ||" + (demoDao.test()));
 }