I'm attempting to develop a Spring Boot application and felt that the structure of my data necessitated several @ManyToMany relationships throughout the code. As such, I've run into an error concerned with infinitely recursive JSON after making a query.
The relationships primarily stem from this file: https://github.com/JakeChvatal/scheduleneu/blob/master/src/main/java/scheduleneu/model/Classes.java
So far, I've tried adding @JsonBackReference and @JsonManagedReference annotations to the various Many to Many relationships (with the relationship in charge having the @JsonManagedReference). However, my code is still exhibiting this error.
How can I avoid this recursive data issue?
This error is visible on the live website here: https://scheduleneu.herokuapp.com/api/classes/all
I'd also appreciate advice on general coding practices and style - I'm relatively new to Spring Boot and web development and am unsure of the conventions.