Hi! I’m the author of the article.
That’s weird, actually. It shouldn’t be happening. As stated here in the official documentation:
You can also put a
@Getter
and/or@Setter
annotation on a class. In that case, it’s as if you annotate all the non-static fields in that class with the annotation.
In this article, they’re adopting the approach I took in the article as well. In other words, @Getter @Setter
at class level should work with private fields.
Anyway, thanks for sharing your solution to the problem you encountered!