Lombok 1.18.2 已发布。下载地址 >>> https://projectlombok.org/download
该版本包含 bug 修复和新增功能特性。具体如下:
BUGFIX: mapstruct + lombok in eclipse should hopefully work again. Issue #1359 and mapstruct issue #1159
BUGFIX: Equals and hashCode again exclude transient fields by default. Issue #1724
BUGFIX: Eclipse 'organize imports' feature (either explicitly, or if automatically triggered on saving via 'save actions') would remove the import for
lombok.var
. Issue #1783BUGFIX: Lombok and gradle v4.9 didn't work together; that's been fixed. Issue #1716 and gradle-apt-plugin issue #87
FEATURE: You can now make builders for type hierarchies, using the new (experimental)
@SuperBuilder
annotation. Thanks for the contribution, Jan Rieke.@SuperBuilder
documentationFEATURE:
@NoArgsConstructor
, including forcing one withlombok.config: lombok.noArgsConstructor.extraPrivate=true
now take any defaults set with@Builder.Default
into account. Issue #1347
Lombok 是一个 Java 实用工具,可用来帮助开发人员消除 Java 的冗长,尤其是对于简单的 Java 对象(POJO)。它通过注释实现这一目的。通过在开发环境中实现 Lombok,开发人员可以节省构建诸如 hashCode()
和 equals()
这样的方法以及以往用来分类各种 accessor 和 mutator 的大量时间。