它在存储库查找方法上返回错误 。 java.lang.UnsupportedOperationException:没有访问者来设置属性@ javax.xml.bind.annotation.XmlElement(namespace = {http://www.w3.org/2005/Atom,name = link,type = class javax.xml.bind.annotation.XmlElement $ DEFAULT,defaultValue =,必填= false,nillable = false)@ com.fasterxml.jackson.annotation.Json
存储库
public interface CommentRepository extends CrudRepository<Comment, String> {
Iterable<Comment> findBySectionIdAndCommentableTypeAndCommentableIdAndDeleted(final String sectionId,
final String commentableType, final String commentableId, final boolean deleted);
评论模型
@ApiModel(description = "Comment")
@Document(collection = "comment")
@JsonInclude(Include.NON_NULL)
@Relation(value = "comment", collectionRelation = "comments")
public class Comment extends ResourceSupport implements Serializable,
UserIdentifiable {
private static final long serialVersionUID = 116036486931198760L;
/** The id of the comment. */
@Id
@ApiModelProperty(readOnly = true)
private String commentId;
@NotEmpty
@ApiModelProperty(required = true)
private String sectionId;
/** The type of the comment applicable element. */
@NotEmpty
@ApiModelProperty(required = true)
private String commentableType;
在将Spring Boot版本升级到2.1.2之后发生