Compare commits

..

10 Commits

Author SHA1 Message Date
Christoph Strobl
f84d9888dd Release version 3.4 RC1 (2021.2.0).
See #4002
2022-04-19 11:10:52 +02:00
Christoph Strobl
8a9e120047 Prepare 3.4 RC1 (2021.2.0).
See #4002
2022-04-19 11:10:13 +02:00
Mark Paluch
26cccf1f14 Upgrade to MongoDB driver 4.6.0.
Closes #4027
2022-04-19 10:05:19 +02:00
Mark Paluch
bfb9c2869c Polishing.
Refine default conversions creation.

See #4014
Original pull request: #4015.
2022-04-05 10:08:37 +02:00
Christoph Strobl
705f1b45c8 Make sure to initialize PropvertyValueConversions in Converter setup.
Closes #4014
Original pull request: #4015.
2022-04-05 10:08:03 +02:00
Oliver Drotbohm
198fcbb1a0 Adapt to API changes in Spring Data Commons.
spring-projects/spring-data-commons#2518 introduced TypeInformation.getTypeDescriptor() which we need to implement in our custom FieldTypeInformation.
2022-04-04 18:14:10 +02:00
Christoph Strobl
a2b3e8562a Upgrade to MongoDB driver 4.5.1
Resolves: #4013
2022-04-04 10:34:41 +02:00
Christoph Strobl
f088c94548 Update build triggers.
See: #4002
2022-03-24 13:54:26 +01:00
Greg L. Turnquist
b8aa26d150 After release cleanups.
See #3973
2022-03-21 10:20:32 -05:00
Greg L. Turnquist
4a24eb22b3 Prepare next development iteration.
See #3973
2022-03-21 10:20:30 -05:00
8 changed files with 28 additions and 12 deletions

2
Jenkinsfile vendored
View File

@@ -9,7 +9,7 @@ pipeline {
triggers {
pollSCM 'H/10 * * * *'
upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
upstream(upstreamProjects: "spring-data-commons/2.7.x", threshold: hudson.model.Result.SUCCESS)
}
options {

View File

@@ -5,7 +5,7 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>3.4.0-M4</version>
<version>3.4.0-RC1</version>
<packaging>pom</packaging>
<name>Spring Data MongoDB</name>
@@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data.build</groupId>
<artifactId>spring-data-parent</artifactId>
<version>2.7.0-M4</version>
<version>2.7.0-RC1</version>
</parent>
<modules>
@@ -26,8 +26,8 @@
<properties>
<project.type>multi</project.type>
<dist.id>spring-data-mongodb</dist.id>
<springdata.commons>2.7.0-M4</springdata.commons>
<mongo>4.5.0</mongo>
<springdata.commons>2.7.0-RC1</springdata.commons>
<mongo>4.6.0</mongo>
<mongo.reactivestreams>${mongo}</mongo.reactivestreams>
<jmh.version>1.19</jmh.version>
</properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>3.4.0-M4</version>
<version>3.4.0-RC1</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>3.4.0-M4</version>
<version>3.4.0-RC1</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>3.4.0-M4</version>
<version>3.4.0-RC1</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -44,6 +44,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.CollectionFactory;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.data.annotation.Reference;
import org.springframework.data.convert.CustomConversions;
@@ -2189,6 +2190,11 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
public org.springframework.data.util.TypeInformation<? extends S> specialize(ClassTypeInformation type) {
return delegate.specialize(type);
}
@Override
public TypeDescriptor toTypeDescriptor() {
return delegate.toTypeDescriptor();
}
}
/**

View File

@@ -166,7 +166,8 @@ public class MongoCustomConversions extends org.springframework.data.convert.Cus
private boolean useNativeDriverJavaTimeCodecs = false;
private final List<Object> customConverters = new ArrayList<>();
private PropertyValueConversions propertyValueConversions = new SimplePropertyValueConversions();
private final PropertyValueConversions internalValueConversion = PropertyValueConversions.simple(it -> {});
private PropertyValueConversions propertyValueConversions = internalValueConversion;
/**
* Create a {@link MongoConverterConfigurationAdapter} using the provided {@code converters} and our own codecs for
@@ -187,7 +188,7 @@ public class MongoCustomConversions extends org.springframework.data.convert.Cus
}
/**
* Set whether or not to use the native MongoDB Java Driver {@link org.bson.codecs.Codec codes} for
* Set whether to or not to use the native MongoDB Java Driver {@link org.bson.codecs.Codec codes} for
* {@link org.bson.codecs.jsr310.LocalDateCodec LocalDate}, {@link org.bson.codecs.jsr310.LocalTimeCodec LocalTime}
* and {@link org.bson.codecs.jsr310.LocalDateTimeCodec LocalDateTime} using a {@link ZoneOffset#UTC}.
*
@@ -327,7 +328,7 @@ public class MongoCustomConversions extends org.springframework.data.convert.Cus
PropertyValueConversions valueConversions() {
if (this.propertyValueConversions == null) {
this.propertyValueConversions = new SimplePropertyValueConversions();
this.propertyValueConversions = internalValueConversion;
}
return this.propertyValueConversions;
@@ -335,6 +336,10 @@ public class MongoCustomConversions extends org.springframework.data.convert.Cus
ConverterConfiguration createConverterConfiguration() {
if (hasDefaultPropertyValueConversions() && propertyValueConversions instanceof SimplePropertyValueConversions) {
((SimplePropertyValueConversions) propertyValueConversions).init();
}
if (!useNativeDriverJavaTimeCodecs) {
return new ConverterConfiguration(STORE_CONVERSIONS, this.customConverters, convertiblePair -> true,
this.propertyValueConversions);
@@ -391,5 +396,9 @@ public class MongoCustomConversions extends org.springframework.data.convert.Cus
return DateToUtcLocalDateTimeConverter.INSTANCE.convert(source).toLocalDate();
}
}
private boolean hasDefaultPropertyValueConversions() {
return propertyValueConversions == internalValueConversion;
}
}
}

View File

@@ -1,4 +1,4 @@
Spring Data MongoDB 3.4 M4 (2021.2.0)
Spring Data MongoDB 3.4 RC1 (2021.2.0)
Copyright (c) [2010-2019] Pivotal Software, Inc.
This product is licensed to you under the Apache License, Version 2.0 (the "License").
@@ -34,5 +34,6 @@ conditions of the subcomponent's license, as noted in the LICENSE file.