diff --git a/gradle.properties b/gradle.properties index 646469f6..a2c24f26 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ version=2.0.0.BUILD-SNAPSHOT -springBootVersion=2.0.0.BUILD-SNAPSHOT -springIoVersion=Cairo-BUILD-SNAPSHOT \ No newline at end of file +springBootVersion=1.5.3.RELEASE +springIoVersion=Cairo-BUILD-SNAPSHOT diff --git a/gradle/dependency-management.properties b/gradle/dependency-management.properties index 01a2583b..103b51f4 100644 --- a/gradle/dependency-management.properties +++ b/gradle/dependency-management.properties @@ -1,3 +1,4 @@ +biz.paluch.redis\:lettuce=4.3.1.Final com.maxmind.geoip2\:geoip2=2.3.1 edu.umd.cs.mtc\:multithreadedtc=1.01 org.springframework.shell\:spring-shell=1.1.0.RELEASE @@ -6,4 +7,4 @@ org.webjars\:html5shiv=3.7.3 org.webjars\:knockout=2.3.0 org.webjars\:sockjs-client=0.3.4 org.webjars\:stomp-websocket=2.3.0 -org.webjars\:webjars-taglib=0.3 \ No newline at end of file +org.webjars\:webjars-taglib=0.3 diff --git a/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle b/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle index b67773ea..e20de21c 100644 --- a/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle +++ b/samples/boot/redis-json/spring-session-sample-boot-redis-json.gradle @@ -3,7 +3,7 @@ apply plugin: 'io.spring.convention.spring-sample-boot' dependencies { compile project(':spring-session') compile"org.springframework.data:spring-data-redis" - compile"io.lettuce:lettuce-core" + compile"biz.paluch.redis:lettuce" compile"org.springframework.boot:spring-boot-starter-web" compile"org.springframework.boot:spring-boot-starter-thymeleaf" compile"org.springframework.boot:spring-boot-starter-security" @@ -16,4 +16,4 @@ dependencies { integrationTestCompile seleniumDependencies -} \ No newline at end of file +} diff --git a/samples/boot/redis/spring-session-sample-boot-redis.gradle b/samples/boot/redis/spring-session-sample-boot-redis.gradle index ec1c7a20..b80b98f9 100644 --- a/samples/boot/redis/spring-session-sample-boot-redis.gradle +++ b/samples/boot/redis/spring-session-sample-boot-redis.gradle @@ -2,7 +2,7 @@ apply plugin: 'io.spring.convention.spring-sample-boot' dependencies { compile project(':spring-session-data-redis') - compile "io.lettuce:lettuce-core" + compile "biz.paluch.redis:lettuce" compile"org.springframework.boot:spring-boot-starter-security" compile"org.springframework.boot:spring-boot-starter-thymeleaf" compile"org.springframework.boot:spring-boot-starter-web" diff --git a/samples/boot/websocket/spring-session-sample-boot-websocket.gradle b/samples/boot/websocket/spring-session-sample-boot-websocket.gradle index acadcaae..a6045533 100644 --- a/samples/boot/websocket/spring-session-sample-boot-websocket.gradle +++ b/samples/boot/websocket/spring-session-sample-boot-websocket.gradle @@ -10,7 +10,7 @@ dependencies { compile"org.springframework.boot:spring-boot-starter-websocket" compile"org.springframework:spring-websocket" compile"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" - compile"io.lettuce:lettuce-core" + compile"biz.paluch.redis:lettuce" compile"org.webjars:bootstrap" compile"org.webjars:html5shiv" compile"org.webjars:knockout" diff --git a/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java b/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java index 6d7d3bee..c89e0082 100644 --- a/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java +++ b/samples/boot/websocket/src/main/java/sample/websocket/WebSocketDisconnectHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-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. @@ -17,7 +17,6 @@ package sample.websocket; import java.util.Arrays; -import java.util.Optional; import sample.data.ActiveWebSocketUser; import sample.data.ActiveWebSocketUserRepository; @@ -43,14 +42,14 @@ public class WebSocketDisconnectHandler if (id == null) { return; } - Optional user = this.repository.findOne(id); - if (!user.isPresent()) { + ActiveWebSocketUser user = this.repository.findOne(id); + if (user == null) { return; } this.repository.delete(id); this.messagingTemplate.convertAndSend("/topic/friends/signout", - Arrays.asList(user.get().getUsername())); + Arrays.asList(user.getUsername())); } }