I have the following field
@Mapping("greatId")
@XmlElement(name = "great_key")
private String greatKey;
So my getters and setters are getGreatKey(), and setGreatKey(..). Then my JSON do not contain the response with field "great_key". But if i add a getter getGreat_key(), then it returns the fields. I dont want to add those getters. What am i doing wrong ?
I found exact same problem explained in : XmlElement ignored by Jackson during serialization