@Transactional
@Override
public ResponseEntity<Error> authRegisterPost(@ApiParam(value = "The email/password", required = true) @Valid @RequestBody UserReg body, Errors errors) throws ApiException {
if(applicationProperties.getLdap().isEnabled()){
throw new ApiException(404, "Disabled");
}
if (errors.hasErrors()) {
Error error = new Error();
error.setError("400");
error.setMessage("Validation Failed");
System.out.println("" + errors.getAllErrors());
return new ResponseEntity<>(error, HttpStatus.BAD_REQUEST);
}
authService.authRegisterPost(body);
return new ResponseEntity<>(HttpStatus.OK);
}
AuthApiController.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:yum
作者:
评论列表
文章目录