使用SpringDataREST,如果您有OneToMany或ManyToOne关系,则PUT操作在“非拥有”实体上返回200,但实际上并不持久加入的资源。示例实体:@Entity(name='author')@ToStringclassAuthorEntityimplementsAuthor{@Id@GeneratedValue(strategy=GenerationType.IDENTITY)LongidStringfullName@ManyToMany(mappedBy='authors')Setbooks}@Entity(name='book')@EqualsAndHashCo
使用SpringDataREST,如果您有OneToMany或ManyToOne关系,则PUT操作在“非拥有”实体上返回200,但实际上并不持久加入的资源。示例实体:@Entity(name='author')@ToStringclassAuthorEntityimplementsAuthor{@Id@GeneratedValue(strategy=GenerationType.IDENTITY)LongidStringfullName@ManyToMany(mappedBy='authors')Setbooks}@Entity(name='book')@EqualsAndHashCo