这两天做导出的下载功能时,报了getOutputStream() has already been called for this response的错,找了很久没找到解决方法。最后在这个网站http://stackoverflow.com/questions/1776142/getoutputstream-has-already-been-called-for-this-response 上找到了解决方法。
“
The problem was caused by my controller method attempting return type of String (view name)when it exits. When the method would exit, a second response stream would be initiated.
Changing the controller method return type to void resolved the problem.
”