It should work with the GET (not sure if the POST is even possible),following is the sample code for the get (got it from net) -
@RequestMapping(value = "/exportar/{tipo}", method = RequestMethod.GET)
@ResponseBody
public void exportar(HttpServletResponse response,@PathVariable TipoEnum tipo) throws IOException{
File file = service.exportar(tipo);
response.setHeader("Content-Disposition", String.format("attachment; filename=\"%s\"", file.getName() + ".xls"));
response.setContentType("application/ms-excel; charset=UTF-8");
InputStream inputStream = new BufferedInputStream(new FileInputStream(file));
FileCopyUtils.copy(inputStream, response.getOutputStream());
}