I have a system built with Spring Framework 3 and now I must implement a file download.
To execute the “donwload action” I usually get the HttpServletReponse object, set the headers and get the user outputstream from it.
It works well, but I’d like to know if there’s an easier/smarter way to do it?
Many thanks!
You can use
@ResponseBodyand return abyte[]