@Path("new")
@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Permissions(roles = AccountRole.ADMIN)
public Response create(@NotNull @FormParam("username") Username username,
@NotNull @FormParam("email") EmailAddress email,
@NotNull @Size(min = 1) @FormParam("password") String password,
@Context UriInfo uriInfo) throws DuplicateEmailException {
Account account = accountService.create(username, email, password);
URI location = uriInfo.getBaseUriBuilder().path(AccountResource.class).build(account.id);
return Response.seeOther(location).build();
}
AccountResource.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:sealion
作者:
评论列表
文章目录