#291 - Upgraded to Spring Boot 1.5.6.

Upgraded to Boot 1.5.6. Updated dependencies of reactive projects to latest versions to make sure the APIs of Boot work with the changes in Spring Data Kay RC1. Upgraded all other dependencies to match and got both the Redis and the Cassandra examples to compile again.

Disabled Cassandra reactive samples for now as they fail at runtime.
This commit is contained in:
Oliver Gierke
2017-08-24 11:04:19 +02:00
parent 013058d410
commit b527cbf1d6
13 changed files with 58 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 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.
@@ -15,6 +15,11 @@
*/
package example.springdata.redis.commands;
import example.springdata.redis.RedisTestConfiguration;
import example.springdata.redis.test.util.RequiresRedisServer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.nio.ByteBuffer;
import java.time.Duration;
import java.util.Collections;
@@ -28,17 +33,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.connection.ReactiveListCommands.PopResult;
import org.springframework.data.redis.connection.ReactiveRedisConnection;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
import org.springframework.data.redis.connection.ReactiveStringCommands.SetCommand;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.test.context.junit4.SpringRunner;
import example.springdata.redis.RedisTestConfiguration;
import example.springdata.redis.test.util.RequiresRedisServer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* Show usage of reactive operations on Redis keys using low level API provided by {@link RedisConnectionFactory}.
*
@@ -54,7 +55,7 @@ public class KeyOperationsTests {
private static final String PREFIX = KeyOperationsTests.class.getSimpleName();
private static final String KEY_PATTERN = PREFIX + "*";
@Autowired RedisConnectionFactory connectionFactory;
@Autowired ReactiveRedisConnectionFactory connectionFactory;
private ReactiveRedisConnection connection;
private RedisSerializer<String> serializer = new StringRedisSerializer();
@@ -76,7 +77,7 @@ public class KeyOperationsTests {
this.connection.keyCommands() //
.keys(ByteBuffer.wrap(serializer.serialize(KEY_PATTERN))) //
.flatMap(Flux::fromIterable) //
.flatMapMany(Flux::fromIterable) //
.doOnNext(byteBuffer -> System.out.println(toString(byteBuffer))) //
.count() //
.doOnSuccess(count -> System.out.println(String.format("Total No. found: %s", count))) //