diff --git a/gradle.properties b/gradle.properties index 2969909d..0e62e6cd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -springBootVersion=2.0.0.M2 -version=2.0.0.BUILD-SNAPSHOT \ No newline at end of file +springBootVersion=2.0.0.M3 +version=2.0.0.BUILD-SNAPSHOT diff --git a/gradle/dependency-management.gradle b/gradle/dependency-management.gradle index 522a12af..0e442d3d 100644 --- a/gradle/dependency-management.gradle +++ b/gradle/dependency-management.gradle @@ -5,11 +5,15 @@ dependencyManagement { mavenBom 'org.springframework.data:spring-data-releasetrain:Kay-BUILD-SNAPSHOT' mavenBom 'org.springframework.security:spring-security-bom:5.0.0.BUILD-SNAPSHOT' } + dependencies { - dependency 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr3' - dependency 'com.h2database:h2:1.4.195' - dependency 'com.hazelcast:hazelcast-client:3.8' - dependency 'com.hazelcast:hazelcast:3.8' + dependencySet(group: 'com.hazelcast', version: '3.8.3') { + entry 'hazelcast' + entry 'hazelcast-client' + } + + dependency 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr4' + dependency 'com.h2database:h2:1.4.196' dependency 'com.maxmind.geoip2:geoip2:2.3.1' dependency 'commons-codec:commons-codec:1.10' dependency 'edu.umd.cs.mtc:multithreadedtc:1.01' @@ -21,10 +25,10 @@ dependencyManagement { dependency 'org.apache.derby:derby:10.13.1.1' dependency 'org.apache.httpcomponents:httpclient:4.5.3' dependency 'org.apache.taglibs:taglibs-standard-jstlel:1.2.5' - dependency 'org.assertj:assertj-core:3.6.2' + dependency 'org.assertj:assertj-core:3.8.0' dependency 'org.hsqldb:hsqldb:2.4.0' - dependency 'org.mockito:mockito-core:2.7.22' - dependency 'org.seleniumhq.selenium:htmlunit-driver:2.26' + dependency 'org.mockito:mockito-core:2.8.47' + dependency 'org.seleniumhq.selenium:htmlunit-driver:2.27' dependency 'org.webjars:bootstrap:2.3.2' dependency 'org.webjars:html5shiv:3.7.3' dependency 'org.webjars:jquery:1.9.0' diff --git a/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle b/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle index 6474dc05..bb1f2a9d 100644 --- a/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle +++ b/samples/boot/findbyusername/spring-session-sample-boot-findbyusername.gradle @@ -1,12 +1,12 @@ apply plugin: 'io.spring.convention.spring-sample-boot' dependencies { - compile "org.springframework.boot:spring-boot-starter-data-redis" + compile project(':spring-session-data-redis') compile "org.springframework.boot:spring-boot-starter-web" compile "org.springframework.boot:spring-boot-starter-thymeleaf" compile "org.springframework.boot:spring-boot-starter-security" + compile "org.springframework.boot:spring-boot-starter-data-redis" compile "org.springframework.boot:spring-boot-devtools" - compile "org.springframework.session:spring-session" compile "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" compile "org.webjars:bootstrap" compile "org.webjars:html5shiv" diff --git a/samples/boot/findbyusername/src/main/java/sample/mvc/IndexController.java b/samples/boot/findbyusername/src/main/java/sample/mvc/IndexController.java index 9327f3d4..944590d8 100644 --- a/samples/boot/findbyusername/src/main/java/sample/mvc/IndexController.java +++ b/samples/boot/findbyusername/src/main/java/sample/mvc/IndexController.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. @@ -21,8 +21,8 @@ import java.util.Collection; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.session.ExpiringSession; import org.springframework.session.FindByIndexNameSessionRepository; +import org.springframework.session.Session; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; @@ -39,11 +39,11 @@ import org.springframework.web.bind.annotation.RequestMethod; public class IndexController { // tag::findbyusername[] @Autowired - FindByIndexNameSessionRepository extends ExpiringSession> sessions; + FindByIndexNameSessionRepository extends Session> sessions; @RequestMapping("/") public String index(Principal principal, Model model) { - Collection extends ExpiringSession> usersSessions = this.sessions + Collection extends Session> usersSessions = this.sessions .findByIndexNameAndIndexValue( FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, principal.getName()) @@ -60,7 +60,7 @@ public class IndexController { FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, principal.getName()).keySet(); if (usersSessionIds.contains(sessionIdToDelete)) { - this.sessions.delete(sessionIdToDelete); + this.sessions.deleteById(sessionIdToDelete); } return "redirect:/"; diff --git a/samples/boot/findbyusername/src/main/resources/templates/index.html b/samples/boot/findbyusername/src/main/resources/templates/index.html index 447b8a16..14dcb1bc 100644 --- a/samples/boot/findbyusername/src/main/resources/templates/index.html +++ b/samples/boot/findbyusername/src/main/resources/templates/index.html @@ -21,8 +21,8 @@