Database Reference
In-Depth Information
Developing a Spring Data Neo4j Application
This section covers a few more items for configuring a development environment, preliminary to walking through the
Spring Data Neo4j application.
Preparing the Graph
To spend more time highlighting code examples for each of the more common graph models, we will use a preloaded
instance of Neo4j including necessary plugins, such as the spatial plugin.
To quickly set up a server instance with the sample data and plugins for this chapter, go to graphstory.com/
practicalneo4j . You will be provided with your own free trial instance, a knowledge base, and email support from Graph
Story. Alternatively, you may run a local neo4j database instance with the sample data by going to graphstory.com/
practicalneo4j , downloading the zip file containing the sample database and plugins, and adding them to your local instance.
Tip
Using the Sample Application
If you have already downloaded the sample application from www.graphstory.com/practicalneo4j for Spring Data
Neo4j and configured it with your local application environment, you can skip ahead to the “Spring Application
Configuration” section.
Otherwise, you will need to go back to the “Spring Data Neo4j Development Environment” section and set up
your local environment in order to follow the examples in the sample application.
In Eclipse (or the IDE you are using), open the file package.properties , which is located in the
com.practicalneo4j.graphstory.service , and edit the GraphStory connection string information. If you are using
a free account from graphstory.com , change the username, password, and URL in Listing 11-13 with the one provided
in your graph console on graphstory.com .
Listing 11-13. Database Connection Settings
rootNeo4jServiceUrl=https://username:password@theURL:7473
If you have installed a local Neo4j server instance, you can modify the configuration to use the local address and
port that you specified during the installation, as in the example shown in Listing 11-14.
Listing 11-14. Database Connection Settings for Local Environment
rootNeo4jServiceUrl=http://localhost:7474
Once the environment is properly configured and started, you can go the local address
http://practicalneo4j-spring and you should see a page like the one shown in Figure 11-6 .
 
 
Search WWH ::




Custom Search