后台代码/**
* 账号是否存在
* @param account
* @return
*/
@RequestMapping(value = "/validateAccountNonExistent.json", method = RequestMethod.GET)
@ResponseBody
public JsonData validateActNonExistent(@RequestParam String account){
System.out.println(account+"============account");
if(sysUserService.checkTelephoneExist(account, null)){
System.out.println("true");
return JsonData.success();
}else if(sysUserService.checkEmailExist(account, null)){
System.out.println("true");
return JsonData.success();
}else{
System.out.println("false");
return JsonData.fail("账号不存在");
}
}
后台拦截器拦截到的日志信息================================================================================================
2019-03-14 11:26:11.162 INFO 15436 --- [nio-8081-exec-3] com.hdcs.interceptor.HttpInterceptor
: request start. servletPath:/sys/user/validateAccountNonExistent.json, methodType:GET
2019-03-14 11:26:11.162 INFO 15436 --- [nio-8081-exec-3] com.hdcs.interceptor.HttpInterceptor
: request start. url:/assets/sys/user/validateAccountNonExistent.json, params:{"account":["admin@qq.com"],"_":["1552533963678"]}
servletPath==========/sys/user/validateAccountNonExistent.json
2019-03-14 11:26:11.162 INFO 15436 --- [nio-8081-exec-3] com.hdcs.interceptor.HttpInterceptor
: request completed. url:/assets/sys/user/validateAccountNonExistent.json, cost:0
说明:前台,浏览器F12 network中访问正确200,后台拦截器也拦截到了数据,但是后台没有进方法,连输出语句都没有输出,ajax会走error:function(){}。
但是只要把前后台代码中的访问路径中的validateAccountNonExistent改成validateTelephoneNonExistent就没有问题 =-= 。求解!!!!!