Commit f582413f authored by Quxl's avatar Quxl

x

parent c3155945
...@@ -81,11 +81,9 @@ public class WebUtilController { ...@@ -81,11 +81,9 @@ public class WebUtilController {
@Transactional @Transactional
@PostMapping("exportExcel") @PostMapping("exportExcel")
@ApiOperation("导出Excel") @ApiOperation("导出Excel")
public void exportExcel(String db_host, String db_name, String username, String password, HttpServletResponse response) throws SQLException, IOException { public void exportExcel(String db_host, String db_name, String username, String password) throws SQLException, IOException {
String filename = "export.xls"; this.verifyAuth();
response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes())); new Export(db_host, db_name, username, password).export();
response.setContentType("application/octet-stream");
new Export(db_host, db_name, username, password).export(response.getOutputStream());
} }
@ResponseBody @ResponseBody
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment