AuthApiController.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:yum 作者:
@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);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号