报错信息:
org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain:
......
报错原因:
无法写入JSON:无限递归(StaskOfFultError);嵌套异常是COM.FaSTXML.JavaS.DavaDist.jSnMappApExpExchange:无限递归(StAccOffFuffError)(通过引用链:
解决办法:
在set方法上加@JsonBackReference