@Authorize(scopes = "roles:create")
@ResponseStatus(value = HttpStatus.CREATED)
@RequestMapping(value = "/v1/roles", method = POST, consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE)
public RoleRepresentation create(@RequestBody RoleRepresentation representation) {
Role role = roleConversionService.convert(representation);
Role created = roleService.create(role).orThrow();
return roleConversionService.convert(roleService.findById(created.getId()).orThrow());
}
RolesEndpoint.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:tokamak
作者:
评论列表
文章目录