Affects Version/s: 4.3.14, 5.0.3
The GSON message converter used to serialise using the class of the object that was being serialised. Now it uses the return type of the controller method.
So when I have
the Cat-specific fields do not get serialised, only Animal fields.
- When I replace GSON with Jackson on the classpath, Cat fields get serialised again.
- When I subclass the GsonHttpMessageSerializer and override writeInternal as follows:
the Cat fields get serialized again.
Probably introduced in
SPR-12811, the last version that serialized Cats as Cats was 4.1.9.