In the spring boot appilciation, I have a restful api that export the excel to client using easyexcel https://github.com/alibaba/easyexcel. The export action will invoke the response.getOutputStream()
. And I also have a annotation tht will using the response.getOutputStream()
to record some log. Now I am facing a issue that:
IllegalStateException: getOutputStream() has already been called for this response
it look like this getOutputStream()
only allow to invoke onece across the http lifetime. What should I do to using the response stream multi times? is it possible? could I copy the output stream when using it that make it avaliable with the next invoke?