You need to use @JsonManagedReference for the roles field in the AppUser entity and @JsonBackReference for the appUsers field in the Role entity. And most likely you also need to use @EntityGraph(attributePaths = "roles") when loading users to avoid LazyInitializationException, or you can just add fetch = FetchType.EAGER for the roles field.