当我添加此代码时,我的整个休息服务停止工作:
@PUT
@Path("upload/{id}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public void addBlob(@PathParam("id") Integer id, @FormDataParam("file") InputStream uploadedInputStream) throws IOException {
TheTempClient entityToMerge = find(id);
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
int read = 0;
byte[] bytes = new byte[1024];
while ((read = uploadedInputStream.read(bytes)) != -1) {
out.write(bytes, 0, read);
}
entityToMerge.setTestBlob(out.toByteArray());
super.edit(entityToMerge);
}
catch (IOException e) {
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
它没有真正说明为什么,我得到的只是:
Severe: WebModule[/MavenProjectTest]StandardWrapper.Throwable
org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
Run Code Online (Sandbox Code Playgroud)
还有一堆错误说" 由以前的错误引起的 "
我一定在这里做了一些非常错误的事,有没有专业的JPA爱好者可以在这里帮助我一点点?
编辑:我正在使用注释而不是web.xml,是否可以在没有web.xml的情况下执行此操作?
我不小心删除了我的文件夹下的一个脚本文件:“包含”试图用另一个文件夹替换文件夹以更改页面的外观时..
有没有办法恢复这些?
所以,我有我的应用程序工作.但我不想使用全局变量.
这是我正在尝试做的事情:
var AMLid;
$(".commentButton").on('click', function () {
AMLid = $(this).closest('tr').siblings().find('p.important').text();
alert("id is:" + AMLid);
});
$(".saveButton").on("click", function () {
$(".modal-body #txtAddComment").val(AMLid);
});
Run Code Online (Sandbox Code Playgroud)
我想从选定的表行中获取ID,并将ID传递给模态对话框,因此我可以在单击模式对话框中的按钮时将ID用作参数.
如何在不使用全局变量的情况下完成相同的操作?可能吗?
使用像这样的全局变量的缺点是什么?如果很多人同时使用它,它会崩溃还是针对错误的ID?
任何帮助表示赞赏.