Commit f582413f authored by Quxl's avatar Quxl

x

parent c3155945
......@@ -81,11 +81,9 @@ public class WebUtilController {
@Transactional
@PostMapping("exportExcel")
@ApiOperation("导出Excel")
public void exportExcel(String db_host, String db_name, String username, String password, HttpServletResponse response) throws SQLException, IOException {
String filename = "export.xls";
response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes()));
response.setContentType("application/octet-stream");
new Export(db_host, db_name, username, password).export(response.getOutputStream());
public void exportExcel(String db_host, String db_name, String username, String password) throws SQLException, IOException {
this.verifyAuth();
new Export(db_host, db_name, username, password).export();
}
@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