我试图从Spring启动休息服务下载文件.
@RequestMapping(path="/downloadFile",method=RequestMethod.GET)
@Consumes(MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<InputStreamReader> downloadDocument(
String acquistionId,
String fileType,
Integer expressVfId) throws IOException {
File file2Upload = new File("C:\\Users\\admin\\Desktop\\bkp\\1.rtf");
HttpHeaders headers = new HttpHeaders();
headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
headers.add("Pragma", "no-cache");
headers.add("Expires", "0");
InputStreamReader i = new InputStreamReader(new FileInputStream(file2Upload));
System.out.println("The length of the file is : "+file2Upload.length());
return ResponseEntity.ok().headers(headers).contentLength(file2Upload.length())
.contentType(MediaType.parseMediaType("application/octet-stream"))
.body(i);
}
Run Code Online (Sandbox Code Playgroud)
当我尝试从浏览器下载文件时,它会开始下载,但始终会失败.导致下载失败的服务有什么问题吗?
我为iOS应用程序创建了一个新版本,以准备一些版本.出于某种原因,我需要取消此版本并创建一个新版本(跳过某些版本).
在将应用程序提交到应用商店之前,我没有看到任何取消版本的选项.在提交审核之前是否有任何方法可以完成.
iPhone上需要的最低iOS版本才能与watchOS 2兼容?
我认为它是iOS 8.2,但是当创建带有watchOS 2的项目时,Xcode默认为9.0.
我正在使用JTable来显示信息.如果我拖动列以重新排序它们之后呈现信息,则会话中的信息以相同的方式显示.但是当我尝试通过迭代列名来检查列名来捕获更改时,序列与旧列相同.为什么API无法提供最新视图?
我的 Android 应用程序在启动时从 Play 商店安装时崩溃,但是当我直接从设备安装 apk 时启动同一个应用程序时,它没有崩溃。知道是什么原因造成的吗?我从 Play 商店收到的崩溃日志如下。
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.codingsquare.pgs/com.codingsquare.pgs.PGSActivity}:
java.lang.ClassNotFoundException: Didn't find class
"com.codingsquare.pgs.PGSActivity" on path: DexPathList[[zip file
"/data/app/com.codingsquare.pgs-1.apk"],nativeLibraryDirectories=[/data/app-
lib/com.codingsquare.pgs-1, /vendor/lib, /system/lib]]
Run Code Online (Sandbox Code Playgroud)
当通过 Eclipse 调试器运行相同的代码时,应用程序运行良好。即使在我们通过测试版渠道安装的 Play 商店中,它也能工作,但当它更新到生产时,它就停止工作了。关于与应用行为差异的任何想法。