@AllArgsConstructor和@NoArgsConstructor都是lombok中的注解,作用在类上;
@AllArgsConstructor使用后添加一个构造函数,该构造函数含有所有已声明字段属性参数
@NoArgsConstructor使用后创建一个无参构造函数
@AllArgsConstructor注解和@NoArgsConstructor注解的作用
最新推荐文章于 2024-06-20 00:37:34 发布
@AllArgsConstructor和@NoArgsConstructor都是lombok中的注解,作用在类上;
@AllArgsConstructor使用后添加一个构造函数,该构造函数含有所有已声明字段属性参数
@NoArgsConstructor使用后创建一个无参构造函数