不幸的是,当我试图向项目中添加一个学生时,会出现一个无限递归错误。我还读过:和
就我而言,他们无缘无故地帮不上忙。org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: In
userService.isEmailUnique(value); // read as a call to userRepository.findByEmail(emailAddress)} private String email;由于isValid()方法和userRepository.findByEmail()之间的递归调用,它失败了。更新java.lang.StackOverflowError: null(many times)