其他分享
首页 > 其他分享> > MyBatis(lombok)

MyBatis(lombok)

作者:互联网

在ida中安装lombok

在maven中导入依赖

<dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.22</version>
        </dependency>
    </dependencies>

作用:

@Getter and @Setter
@FieldNameConstants
@ToString
@EqualsAndHashCode
@AllArgsConstructor, @RequiredArgsConstructor and @NoArgsConstructor
@Log, @Log4j, @Log4j2, @Slf4j, @XSlf4j, @CommonsLog, @JBossLog, @Flogger, @CustomLog
@Data
@Builder
@SuperBuilder
@Singular
@Delegate
@Value
@Accessors
@Wither
@With
@SneakyThrows
@val
@var
experimental @var
@UtilityClass

@Data

@AllArgsConstructor(有参构造)

@NoArgsConstructor(无参构造)

@ToString

标签:NoArgsConstructor,AllArgsConstructor,var,ToString,MyBatis,lombok,Data
来源: https://www.cnblogs.com/doubleconquer/p/15597102.html