java - Cannot put @JsonIgnore annotation on both field and the setter - Mapping Exception -
i have used @jsonignore annotation in both field , setter in entity achieve deserialization issue mentioned in following question.
my issue prevent deserialization of particular field had serialized.
but getting following exception due modification when trying build spring web project. module did change builds successfully.
org.springframework.data.mapping.model.mappingexception: ambiguous mapping! annotation jsonignore configured on field yyyyyy , 1 of accessor methods in class xxxxxentity!
any comment highly appreciated.
the exception triggered spring-data change restricts same annotation on field , method level. however, restriction somehow buggy escapes non spring data annotation in case. they've fixed in more recent version, finding proper version should fix issue well. learn more check out these threads
https://jira.spring.io/browse/datacmns-556, read comments understand rational , problem
the issue fixing (from can pick proper versions)
Comments
Post a Comment