MyBatis(lombok)

在ida中安装lombok

MyBatis(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

MyBatis(lombok)

@AllArgsConstructor(有参构造)

MyBatis(lombok)

@NoArgsConstructor(无参构造)

MyBatis(lombok)

@ToString

MyBatis(lombok)

上一篇:一道原创的js原型题


下一篇:Spring框架-day04之Spring中的常用注解