我想要一个查询参数的解码值,这是我的代码并检查我收到的数据
@RequestMapping(method = RequestMethod.POST, value = "/users/checkEmail")
public
@ResponseBody
boolean
verifyEmail(@RequestParam String emailAddress) {
//in emailAddress I am getting value (emailAddress=mytestemail%40gmail.com)
User User = userService.getUserByLoginName(emailAddress);
return User != null;
}
这里是js代码
$('#create-user-form').validate({
rules: {
emailAddress: {
required: true,
email: true,
remote: {
url: '/MYCode/system/users/checkEmail',
type: 'POST',
data: {
'emailAddress': function() {
return $("input#emailAddress").val();
}
}
}
}
});
我想获得值mytest@gmail.com(即没有emailAddress =和%40)