I've been experimenting with using java config for neo4j setup.
@Configuration
@EnableTransactionManagement(mode = AdviceMode.ASPECTJ)
public class DatabaseConfiguration extends Neo4jConfiguration
{
@Override
@Autowired
public void setGraphDatabaseService( GraphDatabaseService service ) {
super.setGraphDatabaseService( service );
}
@Bean(destroyMethod = "shutdown")
public GraphDatabaseService graphDatabaseService() {
final Map<String,String> options = new HashMap<String, String>();
options.put( "enable_remote_shell", "true" );
return new EmbeddedGraphDatabase( "/usr/share/actual/db", options );
}
}
Is this valid? It appears to work but I'm wondering if I need to do anything with Neo4jConfiguration? Lastly, any insight on how I can replicate <neo4j:repositories base-package="com.foo" />?