如何获得一个干净的解码参数值

时间:2014-02-14 07:40:58

标签: java spring-mvc

我想要一个查询参数的解码值,这是我的代码并检查我收到的数据

@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)

0 个答案:

没有答案