Looping problem when serializing objects to JSON in Spring Boot I’m using Spring Boot 3.2 version with MySQL database. I have two objects