java-rest-api icon indicating copy to clipboard operation
java-rest-api copied to clipboard

Avoid Java boilerplate with Lombok

Open mehmetminanc opened this issue 5 years ago • 2 comments

Many model/POJO classes here can be easily generated with Lombok, which is a very widely used lib.

The benefits are

  • Get rid of no-brainer getter and setters.
  • Get rid of no-brainer but exhaustive constructor, with @Builder or @AllArgConstructor
  • Get rid of no-brainer toString().
  • Avoid water-is-wet tests.
  • Opportunity to use Immutable classes with @Value

mehmetminanc avatar Sep 23 '20 12:09 mehmetminanc

Hi. I would like to contribute if no one has worked on this issue yet!

tha0pham avatar Oct 18 '20 18:10 tha0pham

One downside, I have seen a lombok generated project fail when lombok was used, and it can be more tricky with jackson. But all solvable..

rvt avatar Oct 18 '20 19:10 rvt