美文网首页
Lombok 配置

Lombok 配置

作者: Hsinwong | 来源:发表于2018-09-14 14:49 被阅读0次

Lombok 除了可以在注解中进行一些参数配置之外,还可以通过 lombok.config 配置文件指定默认参数配置。官方说明文档:https://www.projectlombok.org/features/configuration

常用配置

在项目根目录新建 lombok.config 配置文件,内容如下:

# Tell the configuration system it should stop looking for other configuration files (default: false).
config.stopBubbling = true

# Generate setters that return 'this' instead of 'void' (default: false).
lombok.accessors.chain = true

# Don't call the getters but use the fields directly in the generated toString method (default = false).
lombok.toString.doNotUseGetters = true

# When generating toString for classes that extend something (other than Object), either automatically take into account superclass implementation (call), or don't (ski
  #p), or warn and don't (warn). (default = warn).
lombok.toString.callSuper = CALL

相关文章

网友评论

      本文标题:Lombok 配置

      本文链接:https://www.haomeiwen.com/subject/gpmmgftx.html