0
public class Test
{
private static RestAPI rest = new RestAPIFacade("myIp","username","password");
public static void main(String[] args)
{
Map<String, Object> foo = new HashMap<String, Object>();
foo.put("Test key", "testing");
rest.createNode(foo);
}
}
沒有輸出,它只是無限連接掛起。neo4j休息graphdb連接到遠程heroku實例時掛起
環境:
Eclipse的 JDK 7
Neo4j的休息結合1.9:https://github.com/neo4j/java-rest-binding
Heroku的
任何想法,爲什麼這只是掛?
下面的代碼工作:
public class Test
{
private static RestAPI rest = new RestAPIFacade("myIp","username","password");
public static void main(String[] args)
{
Node node = rest.getNodeById(1);
}
}
所以它代表的是我能夠正確檢索遠程值。
爲什麼您使用RestGraphDatabase而不是RestAPI? – Woot4Moo 2013-02-17 18:52:49
,因爲它使用與EmbeddedGraphDatabase相同的API。所以你可以在運行Neo4j嵌入式或作爲服務器時使用相同的代碼(除了[Embedded | Rest] GraphDatabase的初始化。 – 2013-02-17 19:52:02
很棒的瞭解。 – Woot4Moo 2013-02-17 19:56:23