While trying to send an object to the backend, I encountered an UnrecognizedPropertyException. Upon inspecting the object on both the frontend and backend, they appear to be identical.
However, upon checking the object in the frontend console, I discovered an additional property that is not defined anywhere in the project (I even searched for it in IntelliJ using ctrl + shift + f).
This unknown property existed in the object at some point in the past, so is it possible that it is somehow cached?
I have attempted to clear the cache, invalidate cache in IntelliJ, and run npm clean-install, but the issue persists.
How can I determine the source of this unexpected property in the object?
@JsonIgnoreProperties is not a viable solution in this scenario...
Frontend object (Angular 8 + Typescript 2.6.2):
export class ItemEto extends AbstractEto {
item1: number;
item2: number;
}
export class AbstractEto {
id: number;
modificationCounter: number;
}
Backend object (Java 8):
public class ItemEto extends AbstractEto {
private long item1;
private long item2;
}
public class AbstractEto {
private long id;
private long modificationCounter;
}
Object in console (JSON):
{
"ItemEto": {
"item1": 1,
"item2": 2,
"otherUnknownProperty": {
"item3": null;
},
}
}