Browse Source

DATAMONGO-849 - Fixed invalid class reference in readme.

Minor sample code optimizations to use MongoClient instead of Mongo. Fixed repository URL.
pull/123/merge
Oliver Gierke 12 years ago
parent
commit
a402395f5c
  1. 8
      README.md

8
README.md

@ -42,7 +42,7 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
<repository> <repository>
<id>spring-libs-snapshot</id> <id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name> <name>Spring Snapshot Repository</name>
<url>http://repo.springsource.org/libs-snapshot</url> <url>http://repo.spring.io/libs-snapshot</url>
</repository> </repository>
``` ```
@ -81,7 +81,7 @@ class ApplicationConfig extends AbstractMongoConfiguration {
@Override @Override
public Mongo mongo() throws Exception { public Mongo mongo() throws Exception {
return new Mongo(); return new MongoClient();
} }
@Override @Override
@ -94,9 +94,9 @@ class ApplicationConfig extends AbstractMongoConfiguration {
This sets up a connection to a local MongoDB instance and enables the detection of Spring Data repositories (through `@EnableMongoRepositories`). The same configuration would look like this in XML: This sets up a connection to a local MongoDB instance and enables the detection of Spring Data repositories (through `@EnableMongoRepositories`). The same configuration would look like this in XML:
```xml ```xml
<bean id="template" class="org.springframework.data.document.mongodb.MongoTemplate"> <bean id="template" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg> <constructor-arg>
<bean class="com.mongodb.Mongo"> <bean class="com.mongodb.MongoClient">
<constructor-arg value="localhost" /> <constructor-arg value="localhost" />
<constructor-arg value="27017" /> <constructor-arg value="27017" />
</bean> </bean>

Loading…
Cancel
Save