I'm using Jackson as a Json parser and I'm getting an error:
No suitable constructor found for type ~ can not instantiate from JSON object
So I've tried adding @NoArgsConstructor, but now I'm getting this one:
constructor AccountItem in class AccountItem cannot be applied to given types
Here's my class:
@Getter
@Builder
public class AccountItem {
/**
* Accounti dentifier
*/
private Long accountId;
/**
* Account name
*/
private String accountName;
/**
* Account priority
*/
private int accountPriority;
}
What might be the cause?
Add both @AllArgsConstructor and @NoArgsConstructor annotations to your class
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With