时指定@RequestBody类型的我有我已经收到一个抽象类的端点:使用抽象类
@RequestMapping(value = URL, method = RequestMethod.POST)
@ResponseBody
public ModelMap update(@RequestBody SomeAbstractClass form) {
...
}
当我张贴到它,我得到的错误:
Could not read JSON: Can not construct instance of ...,
problem: abstract types can only be instantiated with dditional type information
我理解为什么我得到这个错误,但我不知道我会在哪里指定the additional type information
。理想情况下,我可以通过其中一个注释来指定具体类的类型,但是现在任何解决方案都已足够。
Java对象? – 2013-02-14 21:41:37