updated documentation

This commit is contained in:
Michael Hunger
2012-01-24 13:41:28 +01:00
parent 67c5ea0a37
commit 2a4576e4bb
2 changed files with 22 additions and 3 deletions

View File

@@ -257,6 +257,25 @@ repositories {
<neo4j:config graphDatabaseService="graphDatabaseService"/>
]]></programlisting>
</example>
<example>
<title>XML configuration with GraphDatabaseService bean</title>
<programlisting language="xml"><![CDATA[<context:annotation-config/>
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
destroy-method="shutdown">
<constructor-arg index="0" value="foo/db" />
<constructor-arg index="1">
<map><entry key="enable_remote_shell" value="true"/></map>
</constructor-arg>
</bean>
<bean id="serverWrapper" class="org.neo4j.server.WrappingNeoServerBootstrapper"
init-method="start" destroy-method="stop">
<constructor-arg ref="graphDatabaseService"/>
</bean>]]></programlisting>
</example>
<example>
<title>XML configuration with cross-store</title>
<programlisting language="xml"><![CDATA[<context:annotation-config/>
@@ -311,7 +330,7 @@ repositories {
</para>
</note>
<para>
In order to configure Spring Data Neo4j with Java-based bean metadata, the class
In order to configure Spring Data Neo4j with Java-based bean config, the class
<code>Neo4jConfiguration</code> is registered with the context. This is either done
explicitly in the context configuration, or via classpath scanning for classes that
have the @Configuration annotation. The only thing that must be provided is the

View File

@@ -55,8 +55,8 @@ class Movie {
@Test @Transactional public void persistedMovieShouldBeRetrievableFromGraphDb() {
Movie forrestGump = template.save(new Movie("Forrest Gump", 1994));
Movie retrievedMovie = template.findOne(forrestGump.getNodeId(), Movie.class);
assertEqual("retrieved movie matches persisted one", forrestGump, retrievedMovie);
assertEqual("retrieved movie title matches", "Forrest Gump", retrievedMovie.getTitle());
assertEquals("retrieved movie matches persisted one", forrestGump, retrievedMovie);
assertEquals("retrieved movie title matches", "Forrest Gump", retrievedMovie.getTitle());
}
]]></programlisting>
</example>