I have a project that works with the integrated Neo4j 1.8.2 plus web admin interface.
Now I updated the project to work with the latest Neo4j 2.0.1. Although there were some obstacles during this course (since I use Spring Data Neo4j), everything went smoothly in the end.
But currently I'm stuck in starting a web admin.
Any recommendations would be highly appreciated.
Here is my configuration that I used for version 1.8
(class for configuration mentioned in snippets)
package com.example;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.MapConfiguration;
import org.neo4j.server.configuration.Configurator;
import org.neo4j.server.configuration.ThirdPartyJaxRsPackage;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Neo4jServerConfig implements Configurator {
private Configuration config;
public Neo4jServerConfig(Map<String, String> config) {
this.config = new MapConfiguration(config);
}
@Override
public Configuration configuration() {
return config;
}
@Override
public Map<String, String> getDatabaseTuningProperties() {
return null;
}
@Override
public Set<ThirdPartyJaxRsPackage> getThirdpartyJaxRsClasses() {
return new HashSet<>();
}
@Override
public Set<ThirdPartyJaxRsPackage> getThirdpartyJaxRsPackages() {
return new HashSet<>();
}
}
bean ... ... ... ...
... 1,8 Neo4j.
Neo4j 2.0 . bean,
<util:map id="neo4jConfig">
<entry key="allow_store_upgrade" value="true"/>
<entry key="enable_remote_shell" value="true"/>
<entry key="online_backup_enabled" value="true"/>
<entry key="node_auto_indexing" value="true"/>
<entry key="node_keys_indexable" value="id,name,type,__type__"/>
<entry key="relationship_auto_indexing" value="true"/>
</util:map>
<bean id="graphDbFactory" class="org.neo4j.graphdb.factory.GraphDatabaseFactory"/>
<bean id="graphDbBuilder" factory-bean="graphDbFactory" factory-method="newEmbeddedDatabaseBuilder">
<constructor-arg index="0" value="${neo4j.db.path}"/>
</bean>
<bean id="graphDbBuilderFinal" factory-bean="graphDbBuilder" factory-method="setConfig">
<constructor-arg ref="neo4jConfig"/>
</bean>
<bean id="graphDatabaseService" factory-bean="graphDbBuilderFinal" factory-method="newGraphDatabase" destroy-method="shutdown" />
bean
<bean id="serverWrapper" class="org.neo4j.server.WrappingNeoServerBootstrapper" init-method="start" destroy-method="stop">
<constructor-arg index="0" ref="graphDatabaseService" />
<constructor-arg index="1" ref="config"/>
</bean>
-, "org.neo4j.server.WrappingNeoServerBootstrapper" - - , ?
-, -arg "graphDatabaseService"... : "bean org.neo4j.kernel.GraphDatabaseAPI" ( )
( , , ) , localhost: 28473 .
?
.