Skip to content
Advertisement

How to use Class getMethod with lombok @Data

I am trying to call Class getMethod() method with lombok @Data to call getter of model but i got NoSuchMethod exception. Below are my classes:

Model class:

JavaScript

usage:

JavaScript

Exception:

JavaScript

Advertisement

Answer

You can use below code:

JavaScript

for better explaination click here

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement