This is my District Controller, when I try to fetch data after saving I get the error, even when I try get object form getDistrict(Long id) the same strikes ple
@JsonBackReference and @JsonManagedReference didn't work for me since I was using a class that represented a join table and the only way to get it to work was to put the @JsonBackReference above the fields representing the linked classes. The net effect was that if I was pulling a record from the join class using JSON, none of the join fields would show up, making the returned information useless.
I'd give examples but I like to avoid long replies. @JsonIdentityInfo explained in the article below provides a short, simple but highly efficient solution.
Bidirectional relationships and InfiniteRecursion