leniu-backend-annotations
Installation
SKILL.md
leniu 后端注解速查
注解总览
| 注解 | 作用层 | 包路径 | 场景 |
|---|---|---|---|
@RequiresAuthentication |
Controller 类/方法 | net.xnzn.framework.secure.filter.annotation |
需要登录 |
@RequiresGuest |
Controller 类/方法 | net.xnzn.framework.secure.filter.annotation |
允许游客 |
@Validated |
Controller 方法参数 | org.springframework.validation.annotation |
分组校验 |
@Valid |
Controller 方法参数 | jakarta.validation |
简单校验 |
@Api |
Controller 类 | io.swagger.annotations |
Swagger 类文档 |
@ApiOperation |
Controller 方法 | io.swagger.annotations |
Swagger 方法文档 |
@ApiModelProperty |
DTO/VO/Entity 字段 | io.swagger.annotations |
Swagger 字段文档 |
@TableName |
Entity 类 | com.baomidou.mybatisplus.annotation |
表名映射 |
@TableId |
Entity 主键字段 | com.baomidou.mybatisplus.annotation |
主键策略 |
@TableField |
Entity 字段 | com.baomidou.mybatisplus.annotation |
字段映射/自动填充 |
Related skills