lombok的builder设置默认值
使用lombok的builder设置默认值
依赖
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency>
eg:
@Builder.Default private Integer isDelay=1;
说明:
设置isDelay默认值为1
使用lombok的builder设置默认值
依赖
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency>
eg:
@Builder.Default private Integer isDelay=1;
说明:
设置isDelay默认值为1