Compare commits

...

18 Commits

Author SHA1 Message Date
Eleftheria Stein
d0fabc0a35 Release 2.6.0-M1 2021-08-17 15:50:52 +02:00
Eleftheria Stein
cae8b51eab Upgrade test dependencies 2021-08-17 15:14:03 +02:00
Eleftheria Stein
2236449635 Revert "Upgrade test dependencies"
This reverts commit 9fde87c11b.
2021-08-17 14:07:13 +02:00
Eleftheria Stein
d862836d41 Upgrade Hazelcast 4 to 4.2.2
Closes gh-1887
2021-08-17 13:45:48 +02:00
Eleftheria Stein
4008afe47b Upgrade Spring Security to 5.6.0-M2
Closes gh-1884
2021-08-17 13:29:58 +02:00
Eleftheria Stein
9fde87c11b Upgrade test dependencies 2021-08-17 13:23:08 +02:00
Eleftheria Stein
93c62104ee Make Websocket sample compatible with Spring Boot 2.5.3
Closes gh-1886
2021-08-16 15:08:38 +02:00
Eleftheria Stein
8fdcfc28bc Upgrade samples to Spring Boot 2.5.3
Closes gh-1885
2021-08-16 15:08:09 +02:00
Eleftheria Stein
1f6445999f Upgrade Spring Framework to 5.3.9
Closes gh-1882
2021-08-16 14:00:02 +02:00
Eleftheria Stein
cf4aeae02a Upgrade Spring Data to 2021.1.0-M2
Closes gh-1883
2021-08-16 13:59:25 +02:00
Eleftheria Stein
f8dcee7304 Upgrade Reactor to 2020.0.10
Closes gh-1881
2021-08-16 13:57:00 +02:00
Eleftheria Stein
971a2d17d9 Set cookie path to context path without trailing slash
Closes gh-1863
2021-07-20 10:00:53 +02:00
Ellie Bahadori
8b5b3701da Prevent builds from running on forks
Resolves gh-1678
2021-07-06 17:19:30 +02:00
Eleftheria Stein
21c9fb0cfa Point "What's New" section to Wiki
Closes gh-1878
2021-06-29 16:08:03 +02:00
Jay Bryant
33993b2ff6 Add links to Mongo and Geode docs
Spring Session for MongoDB and Geodo have their own reference guides.
This PR adds links to them.
2021-06-14 13:34:36 +02:00
Jay Bryant
9f4a723160 Add links to the other documentation format
Add a link from the HTML to the PDF and vice-versa.
2021-06-04 08:55:57 +02:00
Eleftheria Stein
25032fbd61 Use GPG_PRIVATE_KEY directly in build
Closes gh-1861
2021-05-31 15:42:16 +03:00
Eleftheria Stein
d195579ced Next development version 2021-05-19 00:41:23 +02:00
16 changed files with 62 additions and 68 deletions

View File

@@ -19,6 +19,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.repository == 'spring-projects/spring-session'
strategy:
matrix:
jdk: [8, 11]
@@ -48,6 +49,7 @@ jobs:
name: Deploy Artifacts
needs: [build]
runs-on: ubuntu-latest
if: github.repository == 'spring-projects/spring-session'
steps:
- uses: actions/checkout@v2
- name: Set up JDK
@@ -63,14 +65,11 @@ jobs:
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
export VERSION_HEADER=$'Version: GnuPG v2\n\n'
export ORG_GRADLE_PROJECT_signingKey=${GPG_PRIVATE_KEY#"$VERSION_HEADER"}
export ORG_GRADLE_PROJECT_signingPassword="$GPG_PASSPHRASE"
./gradlew deployArtifacts -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace --no-parallel
./gradlew finalizeDeployArtifacts -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace --no-parallel
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY_NO_HEADER }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY_NO_HEADER }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }}
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
@@ -79,6 +78,7 @@ jobs:
name: Deploy Docs
needs: [build]
runs-on: ubuntu-latest
if: github.repository == 'spring-projects/spring-session'
steps:
- uses: actions/checkout@v2
- name: Set up JDK

View File

@@ -6,6 +6,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.repository == 'spring-projects/spring-session'
strategy:
matrix:
jdk: [8, 11]

View File

@@ -4,7 +4,7 @@ buildscript {
snapshotBuild = version.endsWith('SNAPSHOT')
milestoneBuild = !(releaseBuild || snapshotBuild)
springBootVersion = '2.4.5'
springBootVersion = '2.5.3'
}
repositories {

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
version=2.5.0
version=2.6.0-M1

View File

@@ -1,11 +1,11 @@
dependencyManagement {
imports {
mavenBom 'io.projectreactor:reactor-bom:2020.0.7'
mavenBom 'io.projectreactor:reactor-bom:2020.0.10'
mavenBom 'org.junit:junit-bom:5.7.2'
mavenBom 'org.springframework:spring-framework-bom:5.3.7'
mavenBom 'org.springframework.data:spring-data-bom:2021.0.1'
mavenBom 'org.springframework.security:spring-security-bom:5.5.0'
mavenBom 'org.testcontainers:testcontainers-bom:1.15.3'
mavenBom 'org.springframework:spring-framework-bom:5.3.9'
mavenBom 'org.springframework.data:spring-data-bom:2021.1.0-M2'
mavenBom 'org.springframework.security:spring-security-bom:5.6.0-M2'
mavenBom 'org.testcontainers:testcontainers-bom:1.16.0'
}
dependencies {
@@ -14,23 +14,23 @@ dependencyManagement {
entry 'hazelcast-client'
}
dependency 'org.aspectj:aspectjweaver:1.9.6'
dependency 'org.aspectj:aspectjweaver:1.9.7'
dependency 'com.h2database:h2:1.4.200'
dependency 'com.ibm.db2:jcc:11.5.5.0'
dependency 'com.microsoft.sqlserver:mssql-jdbc:7.4.1.jre8'
dependency 'com.oracle.database.jdbc:ojdbc8:19.10.0.0'
dependency 'com.ibm.db2:jcc:11.5.6.0'
dependency 'com.microsoft.sqlserver:mssql-jdbc:9.4.0.jre8'
dependency 'com.oracle.database.jdbc:ojdbc8:21.1.0.0'
dependency 'com.zaxxer:HikariCP:3.4.5'
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
dependency 'io.lettuce:lettuce-core:6.1.2.RELEASE'
dependency 'io.lettuce:lettuce-core:6.1.4.RELEASE'
dependency 'javax.annotation:javax.annotation-api:1.3.2'
dependency 'javax.servlet:javax.servlet-api:4.0.1'
dependency 'junit:junit:4.13.2'
dependency 'mysql:mysql-connector-java:8.0.25'
dependency 'mysql:mysql-connector-java:8.0.26'
dependency 'org.apache.derby:derby:10.14.2.0'
dependency 'org.assertj:assertj-core:3.19.0'
dependency 'org.assertj:assertj-core:3.20.2'
dependency 'org.hsqldb:hsqldb:2.5.1'
dependency 'org.mariadb.jdbc:mariadb-java-client:2.7.3'
dependency 'org.mockito:mockito-core:3.10.0'
dependency 'org.postgresql:postgresql:42.2.20'
dependency 'org.mariadb.jdbc:mariadb-java-client:2.7.4'
dependency 'org.mockito:mockito-core:3.11.2'
dependency 'org.postgresql:postgresql:42.2.23'
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 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.
@@ -432,7 +432,8 @@ public class DefaultCookieSerializer implements CookieSerializer {
private String getCookiePath(HttpServletRequest request) {
if (this.cookiePath == null) {
return request.getContextPath() + "/";
String contextPath = request.getContextPath();
return (contextPath != null && contextPath.length() > 0) ? contextPath : "/";
}
return this.cookiePath;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 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.
@@ -109,7 +109,7 @@ class CookieHttpSessionIdResolverTests {
this.strategy.setSessionId(this.request, this.response, this.session.getId());
Cookie sessionCookie = this.response.getCookie(this.cookieName);
assertThat(sessionCookie.getPath()).isEqualTo(this.request.getContextPath() + "/");
assertThat(sessionCookie.getPath()).isEqualTo(this.request.getContextPath());
}
@Test
@@ -131,7 +131,7 @@ class CookieHttpSessionIdResolverTests {
this.strategy.expireSession(this.request, this.response);
Cookie sessionCookie = this.response.getCookie(this.cookieName);
assertThat(sessionCookie.getPath()).isEqualTo(this.request.getContextPath() + "/");
assertThat(sessionCookie.getPath()).isEqualTo(this.request.getContextPath());
}
@Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 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.
@@ -267,7 +267,7 @@ class DefaultCookieSerializerTests {
void writeCookieCookiePathDefaultContextPathUsed() {
this.request.setContextPath("/context");
this.serializer.writeCookieValue(cookieValue(this.sessionId));
assertThat(getCookie().getPath()).isEqualTo("/context/");
assertThat(getCookie().getPath()).isEqualTo("/context");
}
@Test
@@ -275,7 +275,7 @@ class DefaultCookieSerializerTests {
this.request.setContextPath("/context");
this.serializer.setCookiePath(null);
this.serializer.writeCookieValue(cookieValue(this.sessionId));
assertThat(getCookie().getPath()).isEqualTo("/context/");
assertThat(getCookie().getPath()).isEqualTo("/context");
}
@Test

View File

@@ -5,6 +5,14 @@ Rob Winch; Vedran Pavić; Jay Bryant; Eleftheria Stein-Kousathana
:websocketdoc-test-dir: {docs-test-dir}docs/websocket/
:toc: left
ifdef::backend-html5[]
NOTE: This documentation is also available as https://docs.spring.io/spring-session/docs/{spring-session-version}/reference/pdf/spring-session-reference.pdf[PDF].
endif::[]
ifdef::backend-pdf[]
NOTE: This documentation is also available as https://docs.spring.io/spring-session/docs/{spring-session-version}/reference/html5/index.html[HTML].
endif::[]
[[abstract]]
Spring Session provides an API and implementations for managing a user's session information.
@@ -18,28 +26,10 @@ It also provides transparent integration with:
* <<websocket,WebSocket>>: Provides the ability to keep the `HttpSession` alive when receiving WebSocket messages
* <<websession,WebSession>>: Allows replacing the Spring WebFlux's `WebSession` in an application container-neutral way.
== What's New in 2.0
== What's New
The following list highlights what is new in Spring Session 2.0:
* Upgraded to Java 8 and Spring Framework 5 as baseline
* https://github.com/spring-projects/spring-session/issues/683[Added support for managing Spring WebFlux's `WebSession`] with https://github.com/spring-projects/spring-session/issues/816[Redis `ReactiveSessionRepository`]
* https://github.com/spring-projects/spring-session/issues/768[Extracted `SessionRepository` implementations to separate modules]
* Improved https://github.com/spring-projects/spring-session/issues/682[`Session`] and https://github.com/spring-projects/spring-session/issues/809[`SessionRepository`] APIs
* Improved and harmonized configuration support for all supported session stores
* https://github.com/spring-projects/spring-session/pull/713[Added support for configuring default `CookieSerializer` using `SessionCookieConfig`]
* Lots of performance improvements and bug fixes
You can find a complete list of what is new by referring to the changelogs of
* https://github.com/spring-projects/spring-session/milestone/17?closed=1[2.0.0.M1]
* https://github.com/spring-projects/spring-session/milestone/22?closed=1[2.0.0.M2]
* https://github.com/spring-projects/spring-session/milestone/23?closed=1[2.0.0.M3]
* https://github.com/spring-projects/spring-session/milestone/24?closed=1[2.0.0.M4]
* https://github.com/spring-projects/spring-session/milestone/25?closed=1[2.0.0.M5]
* https://github.com/spring-projects/spring-session/milestone/26?closed=1[2.0.0.RC1]
* https://github.com/spring-projects/spring-session/milestone/27?closed=1[2.0.0.RC2]
* https://github.com/spring-projects/spring-session/milestone/30?closed=1[2.0.0.RELEASE]
Check also the Spring Session BOM https://github.com/spring-projects/spring-session-bom/wiki#release-notes[release notes]
for a list of new and noteworthy features, as well as upgrade instructions for each release.
[[samples]]
== Samples and Guides (Start Here)
@@ -156,9 +146,10 @@ Now the situation with project's repositories/modules is as follows:
* https://github.com/spring-projects/spring-session[`spring-session` repository]
** Hosts the Spring Session Core, Spring Session Data Redis, Spring Session JDBC, and Spring Session Hazelcast modules
* https://github.com/spring-projects/spring-session-data-mongodb[`spring-session-data-mongodb` repository]
** Hosts the Spring Session Data MongoDB module
** Hosts the Spring Session Data MongoDB module. Spring Session Data MongoDB has its own user guide, which you can find at the [https://spring.io/projects/spring-session-data-mongodb#learnSpring site].
* https://github.com/spring-projects/spring-session-data-geode[`spring-session-data-geode` repository]
** Hosts the Spring Session Data Geode and Spring Session Data Geode modules
** Hosts the Spring Session Data Geode modules. Spring Session Data Geode has its own user guide, which you can find at the [https://spring.io/projects/spring-session-data-geode#learn site].
Finally, Spring Session now also provides a Maven BOM ("`bill of materials`") module in order to help users with version management concerns:

View File

@@ -31,7 +31,7 @@ artifacts {
dependencies {
compile project(':spring-session-core')
optional "com.hazelcast:hazelcast:4.2"
optional "com.hazelcast:hazelcast:4.2.2"
compile "org.springframework:spring-context"
compile "javax.annotation:javax.annotation-api"

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -45,8 +45,8 @@ import org.springframework.test.context.web.WebAppConfiguration;
@WebAppConfiguration
class ClientServerHazelcast4IndexedSessionRepositoryITests extends AbstractHazelcast4IndexedSessionRepositoryITests {
private static GenericContainer container = new GenericContainer<>("hazelcast/hazelcast:4.2").withExposedPorts(5701)
.withCopyFileToContainer(MountableFile.forClasspathResource("/hazelcast-server.xml"),
private static GenericContainer container = new GenericContainer<>("hazelcast/hazelcast:4.2.2")
.withExposedPorts(5701).withCopyFileToContainer(MountableFile.forClasspathResource("/hazelcast-server.xml"),
"/opt/hazelcast/hazelcast.xml");
@BeforeAll

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config https://www.hazelcast.com/schema/config/hazelcast-config-4.1.xsd">
xsi:schemaLocation="http://www.hazelcast.com/schema/config https://www.hazelcast.com/schema/config/hazelcast-config-4.2.xsd">
<network>
<join>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -42,11 +42,11 @@ final class DatabaseContainers {
}
static MariaDBContainer<?> mariaDb() {
return new MariaDBContainer<>("mariadb:10.6.0");
return new MariaDBContainer<>("mariadb:10.6.4");
}
static MySQLContainer<?> mySql() {
return new MySQLContainer<>("mysql:8.0.25");
return new MySQLContainer<>("mysql:8.0.26");
}
static OracleContainer oracle() {
@@ -68,7 +68,7 @@ final class DatabaseContainers {
}
static PostgreSQLContainer<?> postgreSql() {
return new PostgreSQLContainer<>("postgres:13.3");
return new PostgreSQLContainer<>("postgres:13.4");
}
static MSSQLServerContainer<?> sqlServer() {

View File

@@ -1,17 +1,17 @@
dependencyManagement {
imports {
mavenBom 'com.fasterxml.jackson:jackson-bom:2.12.3'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.12.4'
}
dependencies {
dependency 'ch.qos.logback:logback-classic:1.2.3'
dependency 'ch.qos.logback:logback-classic:1.2.5'
dependency 'com.maxmind.geoip2:geoip2:2.15.0'
dependency 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.2'
dependency 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.3'
dependency 'org.apache.taglibs:taglibs-standard-jstlel:1.2.5'
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.49.1'
dependency 'org.slf4j:jcl-over-slf4j:1.7.30'
dependency 'org.slf4j:log4j-over-slf4j:1.7.30'
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.52.0'
dependency 'org.slf4j:jcl-over-slf4j:1.7.32'
dependency 'org.slf4j:log4j-over-slf4j:1.7.32'
dependency 'org.webjars:bootstrap:2.3.2'
dependency 'org.webjars:html5shiv:3.7.3-1'
dependency 'org.webjars:jquery:3.6.0'

View File

@@ -6,7 +6,7 @@ dependencies {
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 "com.hazelcast:hazelcast:4.2"
compile "com.hazelcast:hazelcast:4.2.2"
compile "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect"
compile "org.webjars:bootstrap"
compile "org.webjars:html5shiv"

View File

@@ -1,2 +1,3 @@
#server.servlet.session.timeout=1m
spring.h2.console.enabled=true
spring.jpa.defer-datasource-initialization=true