/**
* 附件下载
*
* @param id 附件id
* @param response
* @throws IOException
* @throws NoSuchAlgorithmException
* @throws KeyManagementException
*/
@RequestMapping(value = "attachmentDownLoad", method = RequestMethod.GET)
public void attachmentDownLoad(@RequestParam(value = "id", required = true) String id, HttpServletResponse response)
throws IOException, NoSuchAlgorithmException, KeyManagementException {
Attachment attachment = attachmentService.selectByPrimaryKey(id);
String fileName = attachment.getFileName();
HttpsURLConnection.setDefaultHostnameVerifier(new NullHostNameVerifier());
SSLContext sc = SSLContext.getInstance("TLS");
sc.init(null, trustAllCerts, new SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
byte[] data = FileCopyUtils.copyToByteArray(getInputHttpsStreamByGet(attachment.getStorgeUrl()));
fileName = URLEncoder.encode(fileName, "UTF-8");
respo