@RequestMapping(value = "/login", method = RequestMethod.POST)
	public String login(User user, Errors errors, HttpSession session) {
		User actual = userService.getUserByName(user.getName());
		if (Validator.isNull(actual)) {
			errors.rejectValue("name", "error.user.not.exists", "用户名不存在");
			return "login/login";
		}
		if (!actual.isActivity()) {
			errors.rejectValue("activity", "error.user.locked", "用户已被锁定");
			return "login/login";
		}
		if (!actual.getPassword().equals(user.getPassword())) {
			errors.rejectValue("password", "error.user.password.wrong", "密码不正确");
			return "login/login";
		}
		session.setAttribute("user", actual);

		return "redirect:/index";
	}