I'm working on a microservices architecture, I have an old jar version v1.2 and a new jar version v1.6. I have added new fields and models classes to v1.6 which are not present in v1.2.
For example:
Jar v1.2
public class Base{
private Temp1 temp1;
}
Jar v1.6
public class Base{
private Temp1 temp1;
private Temp2 temp2;
}
Class Temp2 is not present in v1.2 and the newer service is deployed as per 1.6. There's a team working on v1.2 and facing a parsing exception for the field temp2 as they are getting temp2=null.
I am not able to understand the issue because it's running in production without any problem. How do I fix this issue and maintain the backward compatibility for such cases?