Beispiel #1
0
 // 负责注册的请求
 @RequestMapping(value = "/register.html")
 public ModelAndView setLogout(HttpServletRequest request) {
   String name = WebUtils.findParameterValue(request, "inputMail");
   String pwd = WebUtils.findParameterValue(request, "inputPassword1");
   String email = name;
   int type = UserType.CONSUMER_USER;
   User u = new User();
   u.setEmail(email);
   u.setName(name);
   u.setPwd(MD5Util.stringMD5(pwd));
   u.setType(type);
   u.setState(ShopState.LIVE);
   userService.addNewUser(u);
   return new ModelAndView("UserDetail");
 }
Beispiel #2
0
 @RequestMapping(value = "/handle22")
 public ModelAndView handle22(HttpServletRequest request) {
   String userName = WebUtils.findParameterValue(request, "userName");
   ModelAndView mav = new ModelAndView();
   mav.setViewName("success");
   mav.addObject("userName", userName);
   return mav;
 }