I'm having a project using Spring Boot to serve JSON in a WebService. An error occurred when I add the Repository class. If you remove it the program starts normally (no errors in the console, I do not speak of features).
The error is: link (I put it in Cjoint because it is too large).
The classes are:
@RepositoryRestResource
public interface Sells extends PagingAndSortingRepository<Long, Sell> {
}
@Entity
public class Sell implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Date sellDate;
@OneToMany(mappedBy = "sell", targetEntity = SellItem.class,
fetch = FetchType.EAGER, cascade = CascadeType.ALL)
private List<SellItem> sellItems;
private Double total;
// Getters e setter omitidos
}
@Entity
public class SellItem implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
private Product product;
private Integer quantity;
@ManyToOne
@JoinColumn(name = "sell_id")
private Sell sell;
//Getters e setter omitidos
}
If needed, ask for more information in the comments.