@RequestMapping(value = "/checkUserNameExists", produces = "application/json")
public AjaxResponse checkUserNameExists(@RequestParam("userName") String userName)
{
boolean exists = userBO.checkUserNameExists(userName);
if (exists) {
return new AjaxResponseBuilder().notOk().error("UserName [" + userName + "] already exist").build();
} else {
return new AjaxResponseBuilder().ok().build();
}
}