Lombok.hashCode issue with "java.lang.StackOverflowError: null"
You have a circular dependency between book and bookdetails. You probably need to exclude book
from BookDetail
or bookDetail
from Book
.
You can add @EqualsAndHashCode(exclude="book")
. For more information, see the EqualsAndHashCode documentation.
lambok resulted to a circular dependency
reason: the toString() method
solution: replace one of your models to
@Getter
@Setter
public class BookDetail
instead of
@Data
public class BookDetail