Does MongoDb create XSD for Spring data - document defines db-factory element?

Spring Data - The document documentation gives and example factory bean settings for creating MongoDB connections using the mongo:db-factory element.

 <mongo:db-factory id="anotherMongoDbFactory" host="localhost" port="27017" dbname="database" username="joe" password="secret"/> 

The problem is that the XSD for the mongo namespace does not declare the db-factory element. Is this a bug or am I looking for the wrong version of the documentation?

+4
source share
1 answer

The mongo: db-factory element is available from Spring -Data 1.0 Milestone 3 . The package can be downloaded from here , and the documentation can be found at Spring -Data 1.0.0.M3 Documentation .

To use it from Maven, simply include the following dependency in the pom.xml file:

 <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-mongodb</artifactId> <version>1.0.0.M3</version> </dependency> 

You probably used the code version 1.0.0.M2 ( Spring-Data 1.0.0.M2 Documentation ), where db-factory was not yet available in XSD or online documentation.

+2
source

All Articles