From 2212ca4b00dd3157e3550e2b524e2b8d4495f0b3 Mon Sep 17 00:00:00 2001 From: Thomas Risberg Date: Fri, 13 May 2011 17:26:47 -0400 Subject: [PATCH] DATADOC-133 changed non-string attributes to xsd:string to support configuration using property placeholder; upgraded to Mongo Java driver 2.5.3 --- spring-data-mongodb/pom.xml | 2 +- .../mongodb/config/spring-mongo-1.0.xsd | 12 +++++----- .../mongodb/config/MongoNamespaceTests.java | 24 +++++++++++++++++-- .../config/MongoNamespaceTests-context.xml | 21 +++++++++++----- .../document/mongodb/config/mongo.properties | 6 +++++ 5 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/mongo.properties diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml index 0074732ed..5ef5ccf0d 100644 --- a/spring-data-mongodb/pom.xml +++ b/spring-data-mongodb/pom.xml @@ -13,7 +13,7 @@ Spring Data MongoDB Support - 2.4 + 2.5.3 2.2.0-beta4 diff --git a/spring-data-mongodb/src/main/resources/org/springframework/data/document/mongodb/config/spring-mongo-1.0.xsd b/spring-data-mongodb/src/main/resources/org/springframework/data/document/mongodb/config/spring-mongo-1.0.xsd index e89ee3d88..09b59efc4 100644 --- a/spring-data-mongodb/src/main/resources/org/springframework/data/document/mongodb/config/spring-mongo-1.0.xsd +++ b/spring-data-mongodb/src/main/resources/org/springframework/data/document/mongodb/config/spring-mongo-1.0.xsd @@ -68,7 +68,7 @@ The Mongo Replica set database addresses The name of the mongo definition (by default "mongo").]]> - + - + - + - + - + - + T readField(String name, Object target) throws Exception { Field field = null; diff --git a/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/MongoNamespaceTests-context.xml b/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/MongoNamespaceTests-context.xml index 20366ae44..ad9e6da16 100644 --- a/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/MongoNamespaceTests-context.xml +++ b/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/MongoNamespaceTests-context.xml @@ -1,17 +1,26 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:mongo="http://www.springframework.org/schema/data/mongo" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation="http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> + - - + + + + diff --git a/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/mongo.properties b/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/mongo.properties new file mode 100644 index 000000000..c06b91b85 --- /dev/null +++ b/spring-data-mongodb/src/test/resources/org/springframework/data/document/mongodb/config/mongo.properties @@ -0,0 +1,6 @@ +mongo.host=127.0.0.1 +mongo.port=27017 +mongo.connectionsPerHost=8 +mongo.connectTimeout=1000 +mongo.maxWaitTime=1500 +mongo.autoConnectRetry=false \ No newline at end of file