jjzjj

defaultReference

全部标签

java - 无法处理托管/反向引用 'defaultReference' : no back reference property found

我有两个模型类。一个是@Entity(name="userTools")@Table(uniqueConstraints=@UniqueConstraint(columnNames={"assignToUser_id","toolsType_id"}))@Inheritance(strategy=InheritanceType.JOINED)@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS,include=JsonTypeInfo.As.PROPERTY,property="className")@JsonIgnoreProperties(ignoreUn

java - Spring REST,JSON "Can not handle managed/back reference ' defaultReference'"415 不支持的媒体类型

我正在尝试发布到http://localhost:9095/translators来自使用Springboot/SpringRestController后端的AngularJS前端。我可以执行GET,响应如下:[{"userId":1,"firstName":"John","lastName":"Doe","emailId":"john.doe@inc.com","languages":[{"languageId":1,"languageCode":"gb","source":true}],"translations":[{"translationId":3,"sourceId":1,

java - Jackson:名称为 'defaultReference' 的多个反向引用属性

我正在尝试将json(字符串格式)映射到对象,但出现以下错误com.fasterxml.jackson.databind.JsonMappingException:Multipleback-referencepropertieswithname'defaultReference'这是json字符串{"pledge":"74","client":"66","date":"","originId":"1","qualityId":"2","grade":"19","packing":"4","tons":"1000","fromDate":"","toDate":"","type":0,"