What are the risks with Project Lombok?

前端 未结 7 1838
名媛妹妹
名媛妹妹 2021-02-01 13:48

I\'m coming up with performance goals for the new year, and I thought I\'d be fun to put a goal to reduce the size of the code base, especially boilerplate. One action I\'ve com

7条回答
  •  耶瑟儿~
    2021-02-01 14:14

    As pointed out by user @Jcs in another answer, i would like to add more.

    In our project we, are using mapstruct which is used to generate mapper classes, before the code is compiled, using mvn generate-sources command, this is done at process phase using maven processor plugin.

    project lombok adds the bytecode for the getter/setter in class file at compile phase.

    since process phase is executed before the compile, it finds that there is no getter/setter available in class.

    There are some workarounds available to execute compile phase more than one. See this git hub ticket for more details.

    Note : I am using STS ide by Spring and it is supported by lombok :)

提交回复
热议问题