@RequestBody annotation in interface is ignored [SPR-15714] #20270
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
Zhihong Zhang opened SPR-15714 and commented
Spring checks super-class/interface for annotation so all Spring annotations are inherited. This works for
@RequestMapping
and@RequestParam
. However, it doesn't work for@RequestBody
. This is inconsistent at least.In the attached example,
@RequestMapping
is inherited butbody
doesn't get the JSON because@RequestBody
in interface is ignored.To reproduce the error, run the App.java and run this curl command,
Affects: 4.3.7
Attachments:
Issue Links:
@PathVariable
on interface methodThe text was updated successfully, but these errors were encountered: