APIJSON icon indicating copy to clipboard operation
APIJSON copied to clipboard

[PUT 请求,remarks() 不合法!非开放请求不允许传远程函数 key():"fun()" !]

Open QingShan512 opened this issue 1 year ago • 4 comments

Description

我实现了一个新的函数,重启了项目。访问的时候提示 PUT 请求,remarks() 不合法!非开放请求不允许传远程函数 key():"fun()" !

public String getCurrentUsername(JSONObject curObj) { try { return SecurityUtils.getUser().getUsername(); } catch (Exception e) { log.warn(e.getMessage()); } return null; }

INSERT INTO zcloudx_codegen.function (id, debug, user_id, language, name, return_type, arguments, demo, detail, version, tag, methods, date, return) VALUES (10, 0, 0, NULL, 'getCurrentUsername', 'String', NULL, '{}', '111', 0, NULL, NULL, '2024-06-25 01:59:07', NULL);

QingShan512 avatar Jun 25 '24 02:06 QingShan512

只有 GET, HEAD 这两个开放请求允许前端传参远程函数,其它的只能后端 Request 表配置

TommyLemon avatar Jun 30 '24 05:06 TommyLemon

好的。谢谢

QingShan512 avatar Jul 09 '24 06:07 QingShan512

具体怎么配置呢?没看到对应的示例

aa52496994 avatar Jul 29 '24 08:07 aa52496994

具体怎么配置呢?没看到对应的示例

@aa52496994 Request 表里一堆例子,不要做伸手党,你的这个问题不会再回复

TommyLemon avatar Jul 31 '24 01:07 TommyLemon