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

为属性和方法修正与补充文档注释。 #2

Open
AkagiYui opened this issue Aug 30, 2023 · 1 comment
Open

为属性和方法修正与补充文档注释。 #2

AkagiYui opened this issue Aug 30, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@AkagiYui
Copy link
Owner

请为所有的属性与方法补充文档注释。

要求:

  1. 使用简体中文。
  2. 内容至少包含中文解释。
  3. 标有 @Resource 注解的属性可不添加文档注释。
  4. 若为方法,需要为参数与返回值添加解释。
  5. 若为类,在类解释与类类型间插入一个空格。如:为 RoleController 注释 角色 控制器
  6. 解释行的最后一行与 @ 开始的行间插入一个空行。

是否有部分注释需要保持英文,请讨论。

示例:

/**
 * 角色 控制器
 *
 * @author AkagiYui
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Resource
    private RoleService roleService;

    /**
     * 获取角色信息
     *
     * @return 角色信息 列表
     */
    @RequestMapping({"/", ""})
    @PreAuthorize("permitAll()")
    public List<RoleInfoResponse> getRoles() {
        return roleService.getAllRoles();
    }

}
@AkagiYui AkagiYui added documentation Improvements or additions to documentation good first issue Good for newcomers labels Aug 30, 2023
@FlapyPan
Copy link
Contributor

我喜欢构造方法注入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants