当前位置:网站首页>@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){}
}
边栏推荐
- vfork执行时出现Segmentation fault
- Sqlserver row to column pivot
- Pytest (6) -fixture (Firmware)
- Le processus de connexion mysql avec docker
- Installation and use of memory leak tool VLD
- Getting started | jetpack hilt dependency injection framework
- 基于QT的tensorRT加速的yolov5
- 程序员新人上午使用 isXxx 形式定义布尔类型,下午就被劝退?
- ComponentScan和ComponentScans的区别
- 为什么线程崩溃不会导致 JVM 崩溃
猜你喜欢

Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)

I2C subsystem (III): I2C driver

Nasvit: neural architecture search of efficient visual converter with gradient conflict perception hypernetwork training

Pytorch配置
![[principles of multithreading and high concurrency: 1_cpu multi-level cache model]](/img/c7/6b5ab4ff7379bfccff7cdbb358ff8f.jpg)
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]

Spark on yarn resource optimization ideas notes

MySql实战45讲【全局锁和表锁】

MySql实战45讲【SQL查询和更新执行流程】

Docker install MySQL
![MySQL practice 45 lecture [row lock]](/img/71/344daddee537a96f0d38241e6896e1.png)
MySQL practice 45 lecture [row lock]
随机推荐
你真的懂继电器吗?
VS 2019 配置tensorRT生成engine
Unity3d RPG implementation (medium)
复选框的使用:全选,全不选,选一部分
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?
敏捷认证(Professional Scrum Master)模拟练习题-2
Find the storage address of the elements in the two-dimensional array
About HTTP cache control
[Fuhan 6630 encodes and stores videos, and uses RTSP server and timestamp synchronization to realize VLC viewing videos]
vfork执行时出现Segmentation fault
Docker install MySQL
基于QT的tensorRT加速的yolov5
How to make backgroundworker return an object
函数栈帧的创建与销毁
JS finds all the parent nodes or child nodes under a node according to the tree structure
BigVision代码
Installation and use of memory leak tool VLD
js根据树结构查找某个节点的下面的所有父节点或者子节点
VS 2019 配置tensorRT生成engine
VS 2019安装及配置opencv