I'm looking for a way to autowire HttpServletResponse
. It doesn't work with spring out of the box, but I've found this description. This works but is sort of annoying, in that spring obviously has a mechanism to make objects request scoped (i.e. HttpServletRequest
) and this seems to be a hack bolted on top.
Is there a way to hook into the same mechanism that spring uses for HttpServletRequest
? And, any idea why spring team decided to only make HttpServletRequest
autowire capable (and excluded HttpServletResponse
)?