From c890d159131bf6eaa3669fef16f2918072ad7af8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 13 Sep 2016 11:02:32 +0200 Subject: [PATCH 1/4] DATAMONGO-1490 - Change the XML data type of boolean flags to String. Prepare issue branch. --- pom.xml | 2 +- spring-data-mongodb-cross-store/pom.xml | 4 ++-- spring-data-mongodb-distribution/pom.xml | 2 +- spring-data-mongodb-log4j/pom.xml | 2 +- spring-data-mongodb/pom.xml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index dfb64f9ba3..be055b119f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-mongodb-parent - 1.10.0.BUILD-SNAPSHOT + 1.10.0.DATAMONGO-1490-SNAPSHOT pom Spring Data MongoDB diff --git a/spring-data-mongodb-cross-store/pom.xml b/spring-data-mongodb-cross-store/pom.xml index ae0a5d6c8f..6f665764d0 100644 --- a/spring-data-mongodb-cross-store/pom.xml +++ b/spring-data-mongodb-cross-store/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-mongodb-parent - 1.10.0.BUILD-SNAPSHOT + 1.10.0.DATAMONGO-1490-SNAPSHOT ../pom.xml @@ -48,7 +48,7 @@ org.springframework.data spring-data-mongodb - 1.10.0.BUILD-SNAPSHOT + 1.10.0.DATAMONGO-1490-SNAPSHOT diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml index 2d02722262..8073d13fc7 100644 --- a/spring-data-mongodb-distribution/pom.xml +++ b/spring-data-mongodb-distribution/pom.xml @@ -13,7 +13,7 @@ org.springframework.data spring-data-mongodb-parent - 1.10.0.BUILD-SNAPSHOT + 1.10.0.DATAMONGO-1490-SNAPSHOT ../pom.xml diff --git a/spring-data-mongodb-log4j/pom.xml b/spring-data-mongodb-log4j/pom.xml index ee5e3336db..1a658dd720 100644 --- a/spring-data-mongodb-log4j/pom.xml +++ b/spring-data-mongodb-log4j/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-mongodb-parent - 1.10.0.BUILD-SNAPSHOT + 1.10.0.DATAMONGO-1490-SNAPSHOT ../pom.xml diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml index 8072d3f665..d19f4be2d9 100644 --- a/spring-data-mongodb/pom.xml +++ b/spring-data-mongodb/pom.xml @@ -11,7 +11,7 @@ org.springframework.data spring-data-mongodb-parent - 1.10.0.BUILD-SNAPSHOT + 1.10.0.DATAMONGO-1490-SNAPSHOT ../pom.xml From a378847acbd557105d0b9cc4c14baa2c189a1962 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 13 Sep 2016 10:58:44 +0200 Subject: [PATCH 2/4] DATAMONGO-1490 - Change the XML data type of boolean flags to String. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now accept String data types for boolean flags in XML configurations. Boolean data types in the XSD don't allows use of property placeholders even if the resolved value could be converted to boolean. Affected fields by this change are: * `` * `` * `` --- .../data/mongodb/config/spring-mongo-1.8.xsd | 6 +++--- .../data/mongodb/config/MongoNamespaceTests.java | 15 +++++++++++++++ .../config/MongoNamespaceTests-context.xml | 6 ++++-- .../data/mongodb/config/mongo.properties | 2 ++ ...itoryIndexCreationIntegrationTests-context.xml | 11 +++++++---- .../data/mongodb/repository/mongo.properties | 1 + 6 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/mongo.properties diff --git a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd index 090427632e..c5e467405f 100644 --- a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd +++ b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd @@ -137,7 +137,7 @@ The MongoClientURI string.]]> - + Enables creation of indexes for queries that get derived from the method name @@ -541,7 +541,7 @@ This controls if the driver is allowed to read from secondaries or slaves. Defa ]]> - + - + + + + - - + diff --git a/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/config/mongo.properties b/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/config/mongo.properties index ef9d7c7361..4ac86e45af 100644 --- a/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/config/mongo.properties +++ b/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/config/mongo.properties @@ -10,3 +10,5 @@ mongo.socketKeepAlive=true mongo.fsync=true mongo.slaveOk=true +mongoSsl.ssl=true + diff --git a/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/RepositoryIndexCreationIntegrationTests-context.xml b/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/RepositoryIndexCreationIntegrationTests-context.xml index d994229bac..72ef773b67 100644 --- a/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/RepositoryIndexCreationIntegrationTests-context.xml +++ b/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/RepositoryIndexCreationIntegrationTests-context.xml @@ -2,12 +2,15 @@ + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> - + + + @@ -15,6 +18,6 @@ - + diff --git a/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/mongo.properties b/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/mongo.properties new file mode 100644 index 0000000000..d784d5f1ed --- /dev/null +++ b/spring-data-mongodb/src/test/resources/org/springframework/data/mongodb/repository/mongo.properties @@ -0,0 +1 @@ +mongo.create-query-indexes=true From 17c1aa4674ad0f903cc0186bc7aee1722a76bdcd Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 13 Sep 2016 11:01:12 +0200 Subject: [PATCH 3/4] DATAMONGO-1490 - Replace space indentation by tabs. --- .../data/mongodb/config/spring-mongo-1.8.xsd | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd index c5e467405f..cb7a7868ed 100644 --- a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd +++ b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd @@ -37,8 +37,8 @@ Defines a MongoClient instance used for accessing MongoDB. - - + + @@ -170,8 +170,8 @@ The MongoClientURI string.]]> + Top-level element that contains one or more custom converters to be used for mapping + domain objects to and from Mongo's DBObject]]> @@ -389,10 +389,10 @@ The name of the Mongo object that determines what server to monitor. (by default --> - - + + @@ -451,14 +451,14 @@ The comma delimited list of host:port entries to use for replica set/pairs. - - + + @@ -559,10 +559,10 @@ The SSLSocketFactory to use for the SSL connection. If none is configured here, - - + + @@ -614,11 +614,11 @@ The comma delimited list of username:password@database entries to use for authen - - - + + + - + @@ -765,8 +765,8 @@ The SSLSocketFactory to use for the SSL connection. If none is configured here, + Element defining a custom converter. + ]]> From 685f144c825abb3b8c8acd3a117e7e9ebceb0dfe Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Mon, 19 Sep 2016 08:28:49 +0200 Subject: [PATCH 4/4] DATAMONGO-1490 - Polishing. Restore 1.8.xsd and create new 1.10 one reflecting the changes made. --- .../main/resources/META-INF/spring.schemas | 3 +- .../data/mongodb/config/spring-mongo-1.10.xsd | 894 ++++++++++++++++++ .../data/mongodb/config/spring-mongo-1.8.xsd | 6 +- 3 files changed, 899 insertions(+), 4 deletions(-) create mode 100644 spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.xsd diff --git a/spring-data-mongodb/src/main/resources/META-INF/spring.schemas b/spring-data-mongodb/src/main/resources/META-INF/spring.schemas index 26a5caba1c..1a6f38d564 100644 --- a/spring-data-mongodb/src/main/resources/META-INF/spring.schemas +++ b/spring-data-mongodb/src/main/resources/META-INF/spring.schemas @@ -6,4 +6,5 @@ http\://www.springframework.org/schema/data/mongo/spring-mongo-1.4.xsd=org/sprin http\://www.springframework.org/schema/data/mongo/spring-mongo-1.5.xsd=org/springframework/data/mongodb/config/spring-mongo-1.5.xsd http\://www.springframework.org/schema/data/mongo/spring-mongo-1.7.xsd=org/springframework/data/mongodb/config/spring-mongo-1.7.xsd http\://www.springframework.org/schema/data/mongo/spring-mongo-1.8.xsd=org/springframework/data/mongodb/config/spring-mongo-1.8.xsd -http\://www.springframework.org/schema/data/mongo/spring-mongo.xsd=org/springframework/data/mongodb/config/spring-mongo-1.8.xsd +http\://www.springframework.org/schema/data/mongo/spring-mongo-1.10.xsd=org/springframework/data/mongodb/config/spring-mongo-1.10.xsd +http\://www.springframework.org/schema/data/mongo/spring-mongo.xsd=org/springframework/data/mongodb/config/spring-mongo-1.10.xsd diff --git a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.xsd b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.xsd new file mode 100644 index 0000000000..4f158fb340 --- /dev/null +++ b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.xsd @@ -0,0 +1,894 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The WriteConcern that will be the default value used when asking the MongoDbFactory for a DB object + + + + + + + + + + + + + + The reference to a MongoTemplate. Will default to 'mongoTemplate'. + + + + + + + Enables creation of indexes for queries that get derived from the method name + and thus reference domain class properties. Defaults to false. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The reference to a DbFactory. + + + + + + + + + + + + The reference to a MongoTypeMapper to be used by this MappingMongoConverter. + + + + + + + The reference to a MappingContext. Will default to 'mappingContext'. + + + + + + + Disables JSR-303 validation on MongoDB documents before they are saved. By default it is set to false. + + + + + + + + + + Enables abbreviating the field names for domain class properties to the + first character of their camel case names, e.g. fooBar -> fb. Defaults to false. + + + + + + + + + + The reference to a FieldNamingStrategy. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The WriteConcern that will be the default value used when asking the MongoDbFactory for a DB object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A reference to a custom converter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The reference to a DbFactory. + + + + + + + + + + + + The WriteConcern that will be the default value used when asking the MongoDbFactory for a DB object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The reference to a DbFactory. + + + + + + + + + + + + + + + + diff --git a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd index cb7a7868ed..f6bacf1ccb 100644 --- a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd +++ b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd @@ -137,7 +137,7 @@ The MongoClientURI string.]]> - + Enables creation of indexes for queries that get derived from the method name @@ -541,7 +541,7 @@ This controls if the driver is allowed to read from secondaries or slaves. Defa ]]> - + - +