我正在使用此代码打开数据库:
GraphDatabaseAPI graphdb2 = (GraphDatabaseAPI) new GraphDatabaseFactory().newEmbeddedDatabaseBuilder("D:\\test\\neo4j\\data").setConfig(ShellSettings.remote_shell_enabled, "TRUE").
setConfig(GraphDatabaseSettings.node_keys_indexable,
USERNAME_PROPERTY + "," + TITLE_PROPERTY + ","
+ NAME_PROPERTY + "," + LABEL_PROPERTY + "," + TYPE_PROPERTY).
setConfig(GraphDatabaseSettings.relationship_keys_indexable,
USERNAME_PROPERTY).
setConfig(GraphDatabaseSettings.node_auto_indexing, "true").
setConfig(GraphDatabaseSettings.relationship_auto_indexing,
"true").
newGraphDatabase();
ServerConfigurator config;
config = new ServerConfigurator(graphdb2);
config.configuration().setProperty(
Configurator.WEBSERVER_PORT_PROPERTY_KEY, 1234);
srv = new WrappingNeoServerBootstrapper(graphdb2, config);
srv.start();
graphDb = srv.getServer().getDatabase().getGraph();
registerShutdownHook(graphDb);
但是,当我的应用程序停止运行时,所有修改都将被忽略。
这是为什么?