Lombok 配置

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
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Cloud為開(kāi)發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見(jiàn)模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,554評(píng)論 19 139
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 47,273評(píng)論 6 342
  • 1.1 Spring IoC容器和bean簡(jiǎn)介 本章介紹了Spring Framework實(shí)現(xiàn)的控制反轉(zhuǎn)(IoC)...
    起名真是難閱讀 2,671評(píng)論 0 8
  • 1. 簡(jiǎn)介 1.1 什么是 MyBatis ? MyBatis 是支持定制化 SQL、存儲(chǔ)過(guò)程以及高級(jí)映射的優(yōu)秀的...
    笨鳥慢飛閱讀 6,236評(píng)論 0 4
  • 魯言閱讀 310評(píng)論 0 0

友情鏈接更多精彩內(nèi)容