Skip to content
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

method.return 这个配置项不起作用 #1045

Open
lan2475 opened this issue Oct 18, 2023 · 7 comments
Open

method.return 这个配置项不起作用 #1045

lan2475 opened this issue Oct 18, 2023 · 7 comments
Labels
status: feedback required feedback required type: bug Something isn't working wontfix This will not be worked on

Comments

@lan2475
Copy link

lan2475 commented Oct 18, 2023

method.return=#real_return
版本[2.6.3.212.0]

@lan2475 lan2475 added the type: bug Something isn't working label Oct 18, 2023
@tangcent
Copy link
Owner

怎么用的呢?

@tangcent tangcent added status: feedback required feedback required status: reviewing This issue or pull request is reviewing labels Oct 21, 2023
@lan2475
Copy link
Author

lan2475 commented Oct 21, 2023

怎么用的呢?

IMG_20231021_202508.jpg

同样的用法,我有个老项目用的2.2.7就可以

@tangcent
Copy link
Owner

用的地方是这样的吗?
@real_return com.itangcent.common.model.UserInfo

@tangcent
Copy link
Owner

我试了一下:

    /**
     * 更新用户名
     *
     * @param id      当前用户id
     * @param newName 新的用户名
     * @param slogon  个人签名
     * @real_return com.itangcent.common.model.UserInfo
     * @deprecated 改用{@link #update(UserInfo)}
     */
    @RequestMapping(value = "/set", method = RequestMethod.PUT)
    public Result<UserInfo> set(@CookieValue(value = "currentId", required = false, defaultValue = "123") long id,
                                String newName,
                                @RequestParam String slogon,
                                @RequestParam(required = false, defaultValue = "10") long times) {

        UserInfo userInfo = new UserInfo();

        userInfo.setId(id);
        userInfo.setName(newName);
        userInfo.setAge(45);
        return Result.success(userInfo);
    }

响应:

RESPONSE

Headers:

name value required desc
content-type application/json;charset=UTF-8 NO

Body:

name type required default desc
id integer NO 用户id
type integer NO 1 :管理员
2 :成员
3 :游客
name string NO
age integer NO 年龄
sex integer NO 「已废弃」It's a secret
birthDay string NO 生日
regtime string NO 注册时间

Response Demo:

{
  "id": 0,
  "type": 0,
  "name": "",
  "age": 0,
  "sex": 0,
  "birthDay": "",
  "regtime": ""
}

@lan2475
Copy link
Author

lan2475 commented Oct 21, 2023

我用的是最新的社区版idea会和这个有关系么?
我试了很久的,不可能是使用问题,我也把不同版本的插件安装上,都不行

@tangcent
Copy link
Owner

我用的是最新的社区版idea会和这个有关系么?

概率很小


用的地方是这样的吗?
@real_return com.itangcent.common.model.UserInfo
还是简单的?
@real_return UserInfo

@tangcent tangcent removed the status: reviewing This issue or pull request is reviewing label Oct 26, 2023
Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback required feedback required type: bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants