【问题标题】:Spring-data-rest 2.5.6 -> Setter no longer calledSpring-data-rest 2.5.6 -> 不再调用 Setter
【发布时间】:2017-05-11 00:15:29
【问题描述】:

当我从 Spring Boot 1.4.1 升级到 1.4.3 时,Spring-data-rest 从 2.5.3 升级到 2.5.6。

之后,SDR 管理的资源中的 @OneToMany 属性不再通过其设置器设置(我现在假设通过直接字段访问)。

要再次调用 setter 需要做什么?我已经尝试过@JsonProperty/@JsonIgnore - 没有运气。

【问题讨论】:

    标签: spring-boot spring-data-rest


    【解决方案1】:

    尝试在实体中使用属性访问。 在我的仓库中查看示例 #2:https://github.com/Cepr0/restdemo

    【讨论】:

      猜你喜欢
      • 2013-01-05
      • 2016-10-26
      • 2016-12-27
      • 2014-10-20
      • 2017-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-30
      相关资源
      最近更新 更多