Skip to content

如何把返回结果的默认结构去掉 #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tzxylao opened this issue May 10, 2020 · 2 comments
Closed

如何把返回结果的默认结构去掉 #40

tzxylao opened this issue May 10, 2020 · 2 comments

Comments

@tzxylao
Copy link

tzxylao commented May 10, 2020

image

@tzxylao tzxylao closed this as completed May 11, 2020
@tzxylao
Copy link
Author

tzxylao commented May 11, 2020

    apiBinder.bindSpiListener(ResultProcessChainSpi.class, new ResultProcessChainSpi() {
        @Override
        public Object callAfter(boolean formPre, ApiInfo apiInfo, Object result) {
            Map<String, Object> optionMap = apiInfo.getOptionMap();
            optionMap.put("resultStructure", false);
            apiInfo.setOptionMap(optionMap);
            return Result.ok(result);
        }
    });

这个这样可以解决

@zycgit
Copy link
Collaborator

zycgit commented May 11, 2020

界面配置。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants