Adjust for Spring 5.0.0.RC4
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -77,7 +77,7 @@
|
||||
<mongo.version>3.4.2</mongo.version>
|
||||
<mongo-reactivestreams.version>1.5.0</mongo-reactivestreams.version>
|
||||
<reactor.version>Bismuth-M3</reactor.version>
|
||||
<spring.version>5.0.0.RC3</spring.version>
|
||||
<spring.version>5.0.0.RC4</spring.version>
|
||||
<spring-data.version>Kay-RC2</spring-data.version>
|
||||
<spring-security.version>5.0.0.M3</spring-security.version>
|
||||
<spring-session.version>2.0.0.BUILD-SNAPSHOT</spring-session.version>
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ReactiveMongoOperationsSessionRepository implements ReactorSessionR
|
||||
return findSession(id)
|
||||
.map(document -> convertToSession(this.mongoSessionConverter, document))
|
||||
.filter(mongoSession -> !mongoSession.isExpired())
|
||||
.switchIfEmpty(Mono.defer(() -> this.delete(id).then(Mono.empty())));
|
||||
.switchIfEmpty(Mono.defer(() -> this.deleteById(id).then(Mono.empty())));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +110,7 @@ public class ReactiveMongoOperationsSessionRepository implements ReactorSessionR
|
||||
* @param id the {@link MongoSession#getId()} to delete
|
||||
*/
|
||||
@Override
|
||||
public Mono<Void> delete(String id) {
|
||||
public Mono<Void> deleteById(String id) {
|
||||
return this.mongoOperations.remove(findSession(id), this.collectionName).then();
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ public class ReactiveMongoOperationsSessionRepositoryTest {
|
||||
given(this.mongoOperations.remove((Mono<? extends Object>) any(), eq("sessions"))).willReturn(Mono.just(DeleteResult.acknowledged(1)));
|
||||
|
||||
// when
|
||||
StepVerifier.create(this.repository.delete(sessionId))
|
||||
StepVerifier.create(this.repository.deleteById(sessionId))
|
||||
.expectNextMatches(aVoid -> {
|
||||
// then
|
||||
verify(this.mongoOperations).remove(any(Document.class),
|
||||
|
||||
Reference in New Issue
Block a user