修改返回的Model,在对应的属性的get方法上使用 com.fasterxml.jackson.annotation.JsonIgnore 注解即可。

 

    @JsonIgnore(true)
      public Type getRawType () {
	    return Result.class;
      }

这样在返回的json中就不会存在rawType属性了

 

在属性上使用 javax.persistence.Transient 注解也可以

相关文章:

  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-09-12
  • 2021-11-10
  • 2021-05-11
猜你喜欢
  • 2021-10-10
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
  • 2022-02-09
  • 2022-02-09
相关资源
相似解决方案