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