@RequestMapping("/signup.do")
	public String signup(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException  {
		String userName = StringUtils.trimToEmpty(request.getParameter("user_name"));
		String email = StringUtils.trimToEmpty(request.getParameter("email"));
		String password = StringUtils.trimToEmpty(request.getParameter("password"));
		String repassword = StringUtils.trimToEmpty(request.getParameter("re_password"));
		if (StringUtils.isEmpty(userName) ||
				StringUtils.isEmpty(password) ||
				StringUtils.isEmpty(email) ||
				StringUtils.isEmpty(repassword)) {
			request.setAttribute("msg", "信息部完整");
			return "signup";
		}
		if (!repassword.equals(password)) {
			request.setAttribute("msg", "两次输入的密码不相匹配");
			return "signup";
		}
		
		// 处理注册逻辑
		Long userId = 0L;
		try {
			userId = userService.signup(new User(0, userName, password, email));
		} catch (UserNameExistException e) {
			request.setAttribute("msg", "用户名已存在");
			return "signup";
		} catch (SignupException e) {
			request.setAttribute("msg", "注册失败，请稍后再试");
			return "signup";
		}
		request.getSession().setAttribute("kankantu_user", userName);
		request.getSession().setAttribute("kankantu_userid", userId);
		return "main";
	}