Lombok 除了可以在注解中進(jìn)行一些參數(shù)配置之外,還可以通過(guò)
lombok.config配置文件指定默認(rèn)參數(shù)配置。官方說(shuō)明文檔:https://www.projectlombok.org/features/configuration
常用配置
在項(xiàng)目根目錄新建 lombok.config 配置文件,內(nèi)容如下:
# 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