小编Ama*_*man的帖子

Internet Explorer中的Neo4j安全错误18

在使用Internet Explorer运行neo4j中的查询时,我得到一个安全错误18 DOM,而相同的查询在chrome中工作正常.

查询我正在运行

create (n);

SecurityError
Run Code Online (Sandbox Code Playgroud)

截图:

安全错误18 DOM

neo4j neo4j-browser

5
推荐指数
1
解决办法
584
查看次数

我想读取tomcat context.xml的参数

我想获得 context.xml 中的 companyName 值我null在编写下面提到的代码后获得了价值

请帮助我从context.xml. 你甚至可以告诉其他获取价值的方式context.xml

注意:不要说要写参数 web.xml

Context.xml (Tomcat 7)

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a …
Run Code Online (Sandbox Code Playgroud)

java tomcat

3
推荐指数
1
解决办法
1万
查看次数

从数据库下载文件而不将其保存在服务器上

我想使用 jersey api 从数据库中检索 pdf(存储为 BLOB)我使用 mybatis 作为数据库框架。我可以下载 pdf,但问题是我将输入流作为数据库获取,我将其另存为文件,然后在响应中传递它,但我不想将该文件保存在服务器中,我希望文件直接到下载给用户。

当前流程:

数据库----->输入流----->文件----------->添加到响应----->用户下载它

         retrieving        making file  passing file          user downloads
Run Code Online (Sandbox Code Playgroud)

我想要的是 :

DATABASE--------->输入流------------>添加到响应------->用户下载它

         retrieving         passing file              user downloads
Run Code Online (Sandbox Code Playgroud)

我想删除服务器中的文件制作,因为数据是机密的

资源接口

@GET
@Path("v1/download/{id}")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response downloadFile(@PathParam("id") int id) throws IOException, SQLException;
Run Code Online (Sandbox Code Playgroud)

资源实施

@Override
public Response downloadFile(int id) throws IOException, SQLException {
    // TODO Auto-generated method stub
    File file = fileUploadService.downloadFile(id);

    ResponseBuilder response = Response.ok(file);
    response.header("Content-Disposition", "attachment;filename=aman.pdf");
    return response.build();
}
Run Code Online (Sandbox Code Playgroud)

服务方式

@Override
public File downloadFile(int id) throws IOException {
    // TODO Auto-generated method …
Run Code Online (Sandbox Code Playgroud)

java pdf jersey spring-mybatis spring-jersey

0
推荐指数
1
解决办法
1755
查看次数