@RequestMapping(value = "/down", method = RequestMethod.GET)
public void down(HttpServletRequest request, HttpServletResponse response) {
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
Resource rs = resourceLoader.getResource(TEMPLETE_FILE);
File file = rs.getFile();
byte[] bytes = new byte[(int) file.length()];
FileInputStream fis = new FileInputStream(file);
response.setContentType("application/x-download");
response.setHeader("Content-disposition", "attachment;");
OutputStream ouputStream = response.getOutputStream();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
baos.write(bytes, 0, bytes.length);
ouputStream.write(baos.toByteArray());
} catch (IOException e) {
var url = appConfig.baseUrl + "/api/apply/employee/packageStopApply/down";
}).success(function (data) {
var blob = new Blob([ data ], {type : "applicationvnd.ms-excel"});
var a = document.getElementById("buttonArea");
a.parentNode.removeChild(a);
var a = document.createElement("a");
a.id = "downLoadTempleteID";
a.download = "解除劳动关系包.xlsx";
a.href = URL.createObjectURL(blob);
document.body.appendChild(a);
angular.element("#spinner").hide();
}).error(function (err) {