当试图将json反序列化为抽象类型时,我会出错。
代码:
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
public abstract class Animal
{
}
public class Dog extends Animal
{
}
public class Zoo
{
Animal a;
}
@RequestMapping(value = "/zoos", method = RequestMetho