Upgrade some deps; fix compatibility with them
* Upgrade to the latest Spring portfolio stack; fix tests and effected classes * The move to the latest Micrometer does not affect code base
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2021 the original author or authors.
|
||||
* Copyright 2013-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -297,8 +297,7 @@ public class ConfigurableMongoDbMessageStore extends AbstractConfigurableMongoDb
|
||||
Query query = groupOrderQuery(groupId);
|
||||
Stream<MessageDocument> documents =
|
||||
getMongoTemplate()
|
||||
.stream(query, MessageDocument.class, this.collectionName)
|
||||
.stream();
|
||||
.stream(query, MessageDocument.class, this.collectionName);
|
||||
|
||||
return documents.map(MessageDocument::getMessage);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2021 the original author or authors.
|
||||
* Copyright 2014-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,7 @@ import java.util.UUID;
|
||||
|
||||
import org.springframework.data.annotation.AccessType;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.annotation.PersistenceCreator;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
@@ -77,7 +77,7 @@ public class MessageDocument {
|
||||
* @param messageId the id of the {@link Message} as a separate persistent property.
|
||||
* @since 5.1
|
||||
*/
|
||||
@PersistenceConstructor
|
||||
@PersistenceCreator
|
||||
MessageDocument(Message<?> message, UUID messageId) {
|
||||
Assert.notNull(message, "'message' must not be null");
|
||||
Assert.notNull(messageId, "'message' ID header must not be null");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -442,8 +442,7 @@ public class MongoDbMessageStore extends AbstractMessageGroupStore
|
||||
Assert.notNull(groupId, GROUP_ID_MUST_NOT_BE_NULL);
|
||||
Query query = whereGroupIdOrder(groupId);
|
||||
Stream<MessageWrapper> messageWrappers =
|
||||
this.template.stream(query, MessageWrapper.class, this.collectionName)
|
||||
.stream();
|
||||
this.template.stream(query, MessageWrapper.class, this.collectionName);
|
||||
|
||||
return messageWrappers.map(MessageWrapper::getMessage);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.annotation.PersistenceCreator;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
import org.springframework.integration.message.AdviceMessage;
|
||||
@@ -324,8 +324,7 @@ public abstract class AbstractMongoDbMessageStoreTests extends MongoDbAvailableT
|
||||
this("baz");
|
||||
}
|
||||
|
||||
@PersistenceConstructor
|
||||
Baz(String name) {
|
||||
@PersistenceCreator Baz(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -345,8 +344,7 @@ public abstract class AbstractMongoDbMessageStoreTests extends MongoDbAvailableT
|
||||
this("abx");
|
||||
}
|
||||
|
||||
@PersistenceConstructor
|
||||
Abc(String name) {
|
||||
@PersistenceCreator Abc(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -368,8 +366,7 @@ public abstract class AbstractMongoDbMessageStoreTests extends MongoDbAvailableT
|
||||
this("xyz");
|
||||
}
|
||||
|
||||
@PersistenceConstructor
|
||||
Xyz(String name) {
|
||||
@PersistenceCreator Xyz(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user