@PutMapping("/{id}")
    @RequiresPermissions(value = {"system:resource:editMenu", "system:resource:editButton"}, logical = Logical.OR)
    public ShenyuAdminResult updateResource(@PathVariable("id") @Valid
                                            @Existed(provider = ResourceMapper.class,
                                                    message = "resource not existed") final String id,
                                            @RequestBody final ResourceDTO resourceDTO) {
        resourceDTO.setId(id);
        return ShenyuAdminResult.success(ShenyuResultMessage.UPDATE_SUCCESS, resourceService.update(resourceDTO));
    }
update resource.

@param id          primary key.
@param resourceDTO resource info
@return {@linkplain ShenyuAdminResult}
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ResourceController.java