@JsonIgnore cannot accept request parameter solution

@JsonIgnore cannot accept request parameter solution

@JsonIgnore ignores some attributes in pojo during json serialization, marks them on attributes or methods, and the returned json data does not contain this attribute.
But it will work in both serialization and deserialization, which leads to the request we want to accept parameters but cannot accept

You can use @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) instead of specifying that the property can only be written

Guess you like

Origin blog.csdn.net/shixiaodongmain/article/details/128451798