当前位置:网站首页>@Accessors annotation function specifies that the prefix follows the hump naming
@Accessors annotation function specifies that the prefix follows the hump naming
2022-07-03 03:12:00 【Friendship years】
Accessors Translation is accessor . With this annotation you can control getter and setter The form of the method .
@Accessors(fluent = true)
Use fluent attribute ,getter and setter Method names are property names , And setter Method returns the current object
@Data
@Accessors(fluent = true)
class User {
private Integer id;
private String name;
// Generated getter and setter The method is as follows , Method brief
public Integer id(){}
public User id(Integer id){}
public String name(){}
public User name(String name){}
}
@Accessors(chain = true)
Use chain attribute ,setter Method returns the current object
@Data
@Accessors(chain = true)
class User {
private Integer id;
private String name;
// Generated setter The method is as follows , Method brief
public User setId(Integer id){}
public User setName(String name){}
}
@Accessors(prefix = “f”)
Use prefix attribute ,getter and setter Method ignores the specified prefix of the property name ( Follow the hump name )
@Data
@Accessors(prefix = "f")
class User {
private Integer fId;
private String fName;
// Generated getter and setter The method is as follows , Method brief
public Integer id(){}
public void id(Integer id){}
public String name(){}
public void name(String name){}
}
边栏推荐
- MySQL practice 45 lecture [row lock]
- Vs Code configure virtual environment
- Pytorch配置
- TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
- On the adjacency matrix and adjacency table of graph storage
- Variable declarations following if statements
- 复选框的使用:全选,全不选,选一部分
- VS 2019 配置tensorRT生成engine
- How to use asp Net MVC identity 2 change password authentication- How To Change Password Validation in ASP. Net MVC Identity 2?
- Chart. JS multitooltip tag - chart js multiTooltip labels
猜你喜欢
一文带你了解 ZigBee
VS 2019配置tensorRT
迅雷chrome扩展插件造成服务器返回的数据js解析页面数据异常
Practice of traffic recording and playback in vivo
docker安装redis
Pytorch配置
Docker install MySQL
On the adjacency matrix and adjacency table of graph storage
Sous - système I2C (IV): débogage I2C
Vs 2019 configuration du moteur de génération de tensorrt
随机推荐
Change cell color in Excel using C - cell color changing in Excel using C
VS code配置虚拟环境
Le processus de connexion mysql avec docker
Use optimization | points that can be optimized in recyclerview
Force deduction ----- the minimum path cost in the grid
How to select the minimum and maximum values of columns in the data table- How to select min and max values of a column in a datatable?
Do you really understand relays?
敏捷认证(Professional Scrum Master)模拟练习题-2
How to return ordered keys after counter counts the quantity
MySQL practice 45 [SQL query and update execution process]
力扣------网格中的最小路径代价
How to make backgroundworker return an object
Use of El tree search method
模糊查詢時報錯Parameter index out of range (1 > number of parameters, which is 0)
Edit and preview in the back pipe to get the value writing method of the form
C language beginner level - pointer explanation - paoding jieniu chapter
Chart. JS multitooltip tag - chart js multiTooltip labels
销毁Session和清空指定的属性
On the adjacency matrix and adjacency table of graph storage
Process the dataset and use labelencoder to convert all IDs to start from 0