Direct self-reference leading to cycle exception
In this case you need to annotate the relationships with @JsonManagedReference and @JsonBackReference like this: @ManyToOne @JoinColumn(name = “company_id”, referencedColumnName = “id”) @JsonBackReference private Company company And @OneToMany(mappedBy=”company”) @JsonManagedReference private Set<Employee> employee = new HashSet<Employee>(); There is a nice example here