我有以下基于文档的代码......
@Controller
@RequestMapping("neptune")
public class NeptuneEndpoint {
@GetMapping("")
@ResponseBody
public String test(){
Cluster.Builder builder = Cluster.build();
builder.addContactPoint("...endpoint...");
builder.port(8182);
Cluster cluster = builder.create();
GraphTraversalSource g = EmptyGraph.instance()
.traversal()
.withRemote(
DriverRemoteConnection.using(cluster)
);
GraphTraversal t = g.V().limit(2).valueMap();
t.forEachRemaining(
e -> System.out.println(e)
);
cluster.close();
return "Neptune Up";
}
}
但是当我尝试跑步时,我得到...
java.util.concurrent.TimeoutException:等待可用主机时超时 - 如果此消息仍然存在,请检查客户端配置和与服务器的连接
另外,我将如何从 AWS IAM 账户添加密钥?