/**
* 导出
*/
@At
@Ok("raw:json")
public void export(HttpServletRequest request,HttpServletResponse response)
{
OutputStream out = null;
try
{
out = response.getOutputStream();
// 省略
Workbook workBook = Excel.createWorkbook(Excel.Excel_Type.EXCEL_97_2003);
Sheet sheet = workBook.createSheet("信息");
workBook.write(out);
} catch (Exception e)
{
System.out.println("导出失败.");
e.printStackTrace();
}
这是使用poi的导出,正常情况下会弹出浏览器的文件保存的窗口的,但使用nutz后,没弹出,应该用@Ok什么?