RolesEndpoint.java 文件源码

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

项目:tokamak 作者:
@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());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号