From 7b1a96f4a942db5caa36aa47d4ad2b2b7f016b8d Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Mon, 13 Jan 2020 09:05:16 +0100 Subject: [PATCH] DATAMONGO-2448 - Bump version to 3.0 SNAPSHOT. In preparation for the upcoming breaking changes when switching to the MongoDB Java Driver 4.0 and the breaking changes required for that update (expected for Milestone 2), we eagerly bump the version number to 3.0. Original pull request: #819. --- pom.xml | 2 +- spring-data-mongodb-benchmarks/pom.xml | 2 +- spring-data-mongodb-distribution/pom.xml | 2 +- spring-data-mongodb/pom.xml | 2 +- .../data/mongodb/core/CountQuery.java | 2 +- .../core/ExecutableUpdateOperation.java | 2 +- .../data/mongodb/core/MongoOperations.java | 26 +- .../mongodb/core/ReactiveMongoOperations.java | 26 +- .../mongodb/core/ReactiveUpdateOperation.java | 2 +- .../mongodb/core/aggregation/Aggregation.java | 2 +- .../core/aggregation/AggregationOptions.java | 6 +- .../core/aggregation/AggregationUpdate.java | 2 +- .../core/aggregation/ArithmeticOperators.java | 6 +- ...dTypeBasedAggregationOperationContext.java | 2 +- .../aggregation/ReplaceRootOperation.java | 2 +- .../aggregation/ReplaceWithOperation.java | 2 +- .../core/aggregation/SetOperation.java | 6 +- .../core/aggregation/UnsetOperation.java | 2 +- .../main/resources/META-INF/spring.schemas | 5 +- .../data/mongodb/config/spring-mongo-3.0.xsd | 708 ++++++++++++++++++ .../test/util/EnableIfMongoServerVersion.java | 2 +- .../util/EnableIfReplicaSetAvailable.java | 2 +- .../mongodb/test/util/MongoTestUtils.java | 4 +- src/main/asciidoc/new-features.adoc | 4 +- 24 files changed, 765 insertions(+), 56 deletions(-) create mode 100644 spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-3.0.xsd diff --git a/pom.xml b/pom.xml index 6db92a46d..7d73b4d2d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-mongodb-parent - 2.3.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT pom Spring Data MongoDB diff --git a/spring-data-mongodb-benchmarks/pom.xml b/spring-data-mongodb-benchmarks/pom.xml index c4766040c..b5dba6f53 100644 --- a/spring-data-mongodb-benchmarks/pom.xml +++ b/spring-data-mongodb-benchmarks/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-mongodb-parent - 2.3.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml index ed39c63e7..dbb385481 100644 --- a/spring-data-mongodb-distribution/pom.xml +++ b/spring-data-mongodb-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-mongodb-parent - 2.3.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml index 25cf02b5d..95beb40e3 100644 --- a/spring-data-mongodb/pom.xml +++ b/spring-data-mongodb/pom.xml @@ -11,7 +11,7 @@ org.springframework.data spring-data-mongodb-parent - 2.3.0.BUILD-SNAPSHOT + 3.0.0.BUILD-SNAPSHOT ../pom.xml diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/CountQuery.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/CountQuery.java index ee2c7368a..66b6a37b8 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/CountQuery.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/CountQuery.java @@ -34,7 +34,7 @@ import org.springframework.util.ObjectUtils; * * @author Christoph Strobl * @author Mark Paluch - * @since 2.3 + * @since 3.0 */ class CountQuery { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ExecutableUpdateOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ExecutableUpdateOperation.java index 414a1b7dc..7155551b8 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ExecutableUpdateOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ExecutableUpdateOperation.java @@ -158,7 +158,7 @@ public interface ExecutableUpdateOperation { * @param update must not be {@literal null}. * @return new instance of {@link TerminatingUpdate}. * @throws IllegalArgumentException if update is {@literal null}. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java index a93670cd0..635ec96d9 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java @@ -888,7 +888,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param update the {@link UpdateDefinition} to apply on matching documents. Must not be {@literal null}. * @param entityClass the parametrized type. Must not be {@literal null}. * @return the converted object that was updated before it was updated or {@literal null}, if not found. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -905,7 +905,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param entityClass the parametrized type. Must not be {@literal null}. * @param collectionName the collection to query. Must not be {@literal null}. * @return the converted object that was updated before it was updated or {@literal null}, if not found. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -925,7 +925,7 @@ public interface MongoOperations extends FluentMongoOperations { * @return the converted object that was updated or {@literal null}, if not found. Depending on the value of * {@link FindAndModifyOptions#isReturnNew()} this will either be the object as it was before the update or as * it is after the update. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -946,7 +946,7 @@ public interface MongoOperations extends FluentMongoOperations { * @return the converted object that was updated or {@literal null}, if not found. Depending on the value of * {@link FindAndModifyOptions#isReturnNew()} this will either be the object as it was before the update or as * it is after the update. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1308,7 +1308,7 @@ public interface MongoOperations extends FluentMongoOperations { * the existing object. Must not be {@literal null}. * @param entityClass class that determines the collection to use. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1329,7 +1329,7 @@ public interface MongoOperations extends FluentMongoOperations { * the existing object. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1346,7 +1346,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1362,7 +1362,7 @@ public interface MongoOperations extends FluentMongoOperations { * the existing. Must not be {@literal null}. * @param entityClass class that determines the collection to use. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1384,7 +1384,7 @@ public interface MongoOperations extends FluentMongoOperations { * the existing. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1401,7 +1401,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1417,7 +1417,7 @@ public interface MongoOperations extends FluentMongoOperations { * the existing. Must not be {@literal null}. * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1436,7 +1436,7 @@ public interface MongoOperations extends FluentMongoOperations { * the existing. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1453,7 +1453,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java index 56e5b088b..1eb5df3d7 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java @@ -683,7 +683,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param update the {@link UpdateDefinition} to apply on matching documents. Must not be {@literal null}. * @param entityClass the parametrized type. Must not be {@literal null}. * @return the converted object that was updated before it was updated. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -699,7 +699,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param entityClass the parametrized type. Must not be {@literal null}. * @param collectionName the collection to query. Must not be {@literal null}. * @return the converted object that was updated before it was updated. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -717,7 +717,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param entityClass the parametrized type. * @return the converted object that was updated. Depending on the value of {@link FindAndModifyOptions#isReturnNew()} * this will either be the object as it was before the update or as it is after the update. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -736,7 +736,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param collectionName the collection to query. Must not be {@literal null}. * @return the converted object that was updated. Depending on the value of {@link FindAndModifyOptions#isReturnNew()} * this will either be the object as it was before the update or as it is after the update. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1171,7 +1171,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * the existing object. Must not be {@literal null}. * @param entityClass class that determines the collection to use. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1190,7 +1190,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * the existing object. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1207,7 +1207,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1225,7 +1225,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * the existing. Must not be {@literal null}. * @param entityClass class that determines the collection to use. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1246,7 +1246,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * the existing. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1263,7 +1263,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1279,7 +1279,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * the existing. Must not be {@literal null}. * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1298,7 +1298,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * the existing. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ @@ -1315,7 +1315,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param entityClass class of the pojo to be operated on. Must not be {@literal null}. * @param collectionName name of the collection to update the object in. Must not be {@literal null}. * @return the {@link UpdateResult} which lets you access the results of the previous write. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveUpdateOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveUpdateOperation.java index 6c7e6b625..0bb6d23c0 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveUpdateOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveUpdateOperation.java @@ -125,7 +125,7 @@ public interface ReactiveUpdateOperation { * @param update must not be {@literal null}. * @return new instance of {@link TerminatingUpdate}. Never {@literal null}. * @throws IllegalArgumentException if update is {@literal null}. - * @since 2.3 + * @since 3.0 * @see Update * @see AggregationUpdate */ diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/Aggregation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/Aggregation.java index 7229c8339..c7e8c1b2c 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/Aggregation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/Aggregation.java @@ -120,7 +120,7 @@ public class Aggregation { * * @param operations can be {@literal empty} but must not be {@literal null}. * @return new instance of {@link AggregationUpdate}. - * @since 2.3 + * @since 3.0 */ public static AggregationUpdate newUpdate(AggregationOperation... operations) { return AggregationUpdate.from(Arrays.asList(operations)); diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java index 381fa15ab..39ad590d9 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java @@ -215,7 +215,7 @@ public class AggregationOptions { /** * @return the time limit for processing. {@link Duration#ZERO} is used for the default unbounded behavior. - * @since 2.3 + * @since 3.0 */ public Duration getMaxTime() { return maxTime; @@ -279,7 +279,7 @@ public class AggregationOptions { /** * @return - * @since 2.3 + * @since 3.0 */ public boolean hasExecutionTimeLimit() { return !maxTime.isZero() && !maxTime.isNegative(); @@ -393,7 +393,7 @@ public class AggregationOptions { * @param maxTime {@link Duration#ZERO} is used for the default unbounded behavior. {@link Duration#isNegative() * Negative} values will be ignored. * @return this. - * @sinve 2.3 + * @since 3.0 */ public Builder maxTime(@Nullable Duration maxTime) { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationUpdate.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationUpdate.java index e8201e4ba..5866f2a1e 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationUpdate.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationUpdate.java @@ -74,7 +74,7 @@ import org.springframework.util.Assert; * @see MongoDB * Reference Documentation - * @since 2.3 + * @since 3.0 */ public class AggregationUpdate extends Aggregation implements UpdateDefinition { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java index fa21ccb95..9cda3ffcd 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java @@ -516,7 +516,7 @@ public class ArithmeticOperators { * place. * * @return new instance of {@link Round}. - * @since 2.3 + * @since 3.0 */ public Round round() { return usesFieldRef() ? Round.roundValueOf(fieldReference) : Round.roundValueOf(expression); @@ -526,7 +526,7 @@ public class ArithmeticOperators { * Creates new {@link AggregationExpression} that rounds a number to a specified decimal place. * * @return new instance of {@link Round}. - * @since 2.3 + * @since 3.0 */ public Round roundToPlace(int place) { return round().place(place); @@ -1455,7 +1455,7 @@ public class ArithmeticOperators { * decimal. * * - * @since 2.3 + * @since 3.0 */ public static class Round extends AbstractAggregationExpression { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RelaxedTypeBasedAggregationOperationContext.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RelaxedTypeBasedAggregationOperationContext.java index af81ca3de..2c53c275a 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RelaxedTypeBasedAggregationOperationContext.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RelaxedTypeBasedAggregationOperationContext.java @@ -29,7 +29,7 @@ import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty; * {@link InvalidPersistentPropertyPath} exceptions when resolving mapped field names. * * @author Christoph Strobl - * @since 2.3 + * @since 3.0 */ public class RelaxedTypeBasedAggregationOperationContext extends TypeBasedAggregationOperationContext { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceRootOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceRootOperation.java index 7eed7a068..0bf5341c3 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceRootOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceRootOperation.java @@ -98,7 +98,7 @@ public class ReplaceRootOperation implements FieldsExposingAggregationOperation * Obtain the {@link Replacement}. * * @return never {@literal null}. - * @since 2.3 + * @since 3.0 */ protected Replacement getReplacement() { return replacement; diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceWithOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceWithOperation.java index e341cf4ec..60bdcdc3a 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceWithOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ReplaceWithOperation.java @@ -27,7 +27,7 @@ import org.springframework.util.Assert; * possible to promote an embedded document to the top-level or specify a new document. * * @author Christoph Strobl - * @since 2.3 + * @since 3.0 * @see MongoDB Aggregation * Framework: $replaceWith */ diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SetOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SetOperation.java index 61657450a..d7b97297e 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SetOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SetOperation.java @@ -37,7 +37,7 @@ import org.springframework.lang.Nullable; * * * @author Christoph Strobl - * @since 2.3 + * @since 3.0 * @see MongoDB Aggregation Framework: * $set */ @@ -180,7 +180,7 @@ public class SetOperation implements InheritsFieldsAggregationOperation { /** * @author Christoph Strobl - * @since 2.3 + * @since 3.0 */ public static class FieldAppender { @@ -226,7 +226,7 @@ public class SetOperation implements InheritsFieldsAggregationOperation { /** * @author Christoph Strobl - * @since 2.3 + * @since 3.0 */ public interface ValueAppender { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/UnsetOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/UnsetOperation.java index 5a62b5c50..abd62c5b5 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/UnsetOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/UnsetOperation.java @@ -30,7 +30,7 @@ import org.springframework.util.CollectionUtils; * Removes fields from documents. * * @author Christoph Strobl - * @since 2.3 + * @since 3.0 * @see MongoDB Aggregation Framework: * $unset */ 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 bcc150e5f..af0a45b37 100644 --- a/spring-data-mongodb/src/main/resources/META-INF/spring.schemas +++ b/spring-data-mongodb/src/main/resources/META-INF/spring.schemas @@ -22,5 +22,6 @@ https\://www.springframework.org/schema/data/mongo/spring-mongo-1.8.xsd=org/spri https\://www.springframework.org/schema/data/mongo/spring-mongo-1.10.xsd=org/springframework/data/mongodb/config/spring-mongo-1.10.xsd https\://www.springframework.org/schema/data/mongo/spring-mongo-1.10.2.xsd=org/springframework/data/mongodb/config/spring-mongo-1.10.2.xsd https\://www.springframework.org/schema/data/mongo/spring-mongo-2.0.xsd=org/springframework/data/mongodb/config/spring-mongo-2.0.xsd -https\://www.springframework.org/schema/data/mongo/spring-mongo-2.2.xsd=org/springframework/data/mongodb/config/spring-mongo-2.0.xsd -https\://www.springframework.org/schema/data/mongo/spring-mongo.xsd=org/springframework/data/mongodb/config/spring-mongo-2.2.xsd +https\://www.springframework.org/schema/data/mongo/spring-mongo-2.2.xsd=org/springframework/data/mongodb/config/spring-mongo-2.2.xsd +https\://www.springframework.org/schema/data/mongo/spring-mongo-3.0.xsd=org/springframework/data/mongodb/config/spring-mongo-3.0.xsd +https\://www.springframework.org/schema/data/mongo/spring-mongo.xsd=org/springframework/data/mongodb/config/spring-mongo-3.0.xsd diff --git a/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-3.0.xsd b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-3.0.xsd new file mode 100644 index 000000000..bc1c52091 --- /dev/null +++ b/spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-3.0.xsd @@ -0,0 +1,708 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/test/java/org/springframework/data/mongodb/test/util/EnableIfMongoServerVersion.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfMongoServerVersion.java index 1f5bdff61..9bd99945e 100644 --- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfMongoServerVersion.java +++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfMongoServerVersion.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Tag; /** * @author Christoph Strobl - * @since 2.3 + * @since 3.0 */ @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD }) diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfReplicaSetAvailable.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfReplicaSetAvailable.java index 16e014193..78f965ca8 100644 --- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfReplicaSetAvailable.java +++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/EnableIfReplicaSetAvailable.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Tag; * replicaSet mode. Intended to be used along with {@link MongoServerCondition}. * * @author Christoph Strobl - * @since 2.3 + * @since 3.0 */ @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/MongoTestUtils.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/MongoTestUtils.java index 38829da04..258f0625f 100644 --- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/MongoTestUtils.java +++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/test/util/MongoTestUtils.java @@ -199,7 +199,7 @@ public class MongoTestUtils { /** * @return the server version extracted from buildInfo. - * @since 2.3.0 + * @since 3.0 */ public static Version serverVersion() { @@ -216,7 +216,7 @@ public class MongoTestUtils { /** * @return check if the server is running as part of a replica set. - * @since 2.3.0 + * @since 3.0 */ public static boolean serverIsReplSet() { diff --git a/src/main/asciidoc/new-features.adoc b/src/main/asciidoc/new-features.adoc index 82142252a..1f0f4cac5 100644 --- a/src/main/asciidoc/new-features.adoc +++ b/src/main/asciidoc/new-features.adoc @@ -1,8 +1,8 @@ [[new-features]] = New & Noteworthy -[[new-features.2-3-0]] -== What's New in Spring Data MongoDB 2.3 +[[new-features.3.0]] +== What's New in Spring Data MongoDB 3.0 * Support for <>. * Apply pagination when using GridFS `find(Query)`.