Scenes:
1.producer is springMVC dev mode
class QueryWrapper {
int x;
int y;
}
void method(QueryWrapper querys, int p2);
will produce swagger operation, have 3 parameters: x, y, p2
2.consumer is POJO dev mode, declare a interface:
interface TestIntf {
void method(int x, int y, int p2);
}
until now, everything is ok.
3.producer upgrade
class QueryWrapper {
int x;
int y;
int z;
}
will produce swagger operation, have 4 parameters: x,y,z,p2
in this time, old POJO consumers will have problems:
assign x to x, y to y, p2 to z
that's because we map parameters by their index
to resolve the problem:
we need to map parameters by their name
this require customers change their compile argument in pom.xml to allow
interface present method parameter name
if did not add compile argument, SDK can throw exception, and print how
to add the compile argument.
any idea?