Should I close the Writer parameter to my Spring 3 controller?

In [Section 15.3.2.3 Supported handler method arguments and return types][1] of the Spring 3.0 documentation, it says that a java.io.OutputStream or java.io.Writer can be specified as a parameter of a method annotated with @RequestMapping "for generating the response's content. This value is the raw OutputStream/Writer as exposed by the Servlet API." Is it the method's responsibility to close the writer before it finishes or should it remain open and some other Spring process will close it? [1]: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping-arguments

以上就是Should I close the Writer parameter to my Spring 3 controller?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏