index.html中配置服务器地址
window._CONFIG['domianURL'] = 'http://localhost:8080/spss'
window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static'
window.open(window._CONFIG['staticDomainURL']+"/"+"人员信息_导入模板.xlsx");//TODO 下载的方法
/**
* 预览图片&下载文件
* 请求地址:http://localhost:8080/common/static/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
*
* @param request
* @param response
*/
@GetMapping(value = "/static/**")
public void view(HttpServletRequest request, HttpServletResponse response) {
// ISO-8859-1 ==> UTF-8 进行编码转换
String imgPath = extractPathFromPattern(request);
if(oConvertUtils.isEmpty(imgPath) || imgPath=="null"){
return;
}
// 其余处理略
InputStream inputStream = null;
OutputStream outputStream