Following up on #36307, there is also the specific case of @ResponseBody detection at the controller class level in RequestResponseBodyMethodProcessor.supportsReturnType. For a shortcut during request-level resolution, we can locally cache a boolean flag per controller class there.