這是我有:春@RequestMapping解串器
SomeController.java
@Controller
@RequestMapping(value = "/foo", produces = MediaType.APPLICATION_JSON_VALUE)
public class SomeController {
@RequestMapping(value = "/bar", method = RequestMethod.POST)
public @ResponseBody ResponseEntity<Resource<Baz>> createCampaign(@RequestBody Foobar foobar) {
...
}
}
現在,我需要使用自定義JsonDeserialiser
爲foobar
,但僅限於該特定端點,每隔端點爲Foobar
,因爲其@RequestBody
應使用默認值。這怎麼能實現?
難道你不能在序列化之後用Foobar中的數據進行調整嗎? – luboskrnac 2014-10-09 07:09:21