Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6cb9340a1 | ||
|
|
cde82afa9e | ||
|
|
d42caa2dbb | ||
|
|
a9e9f8c46d | ||
|
|
30e9dc0a17 | ||
|
|
c92808fa32 | ||
|
|
bdc3a51409 | ||
|
|
e80021f334 | ||
|
|
a739b0794c | ||
|
|
384633f8b4 | ||
|
|
30f17f96f5 | ||
|
|
ac9077b9d6 | ||
|
|
c4c7d8e233 | ||
|
|
1ce7640fc5 | ||
|
|
a50a2fe3c9 | ||
|
|
74a21dd876 | ||
|
|
c800c7af40 | ||
|
|
0033adf74e | ||
|
|
0f63b0c4c8 |
@@ -1,9 +1,9 @@
|
||||
name: CI
|
||||
name: 2.5.x CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 2.5.x
|
||||
schedule:
|
||||
- cron: '0 10 * * *' # Once per day at 10am UTC
|
||||
workflow_dispatch: # Manual trigger
|
||||
@@ -19,7 +19,6 @@ jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'spring-projects/spring-session'
|
||||
strategy:
|
||||
matrix:
|
||||
jdk: [8, 11]
|
||||
@@ -49,7 +48,6 @@ 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
|
||||
@@ -65,11 +63,14 @@ 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:
|
||||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY_NO_HEADER }}
|
||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY_NO_HEADER }}
|
||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }}
|
||||
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
@@ -78,7 +79,6 @@ 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
|
||||
|
||||
8
.github/workflows/pr-build-workflow.yml
vendored
8
.github/workflows/pr-build-workflow.yml
vendored
@@ -1,12 +1,14 @@
|
||||
name: PR Build
|
||||
name: 2.5.x PR Build
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 2.5.x
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'spring-projects/spring-session'
|
||||
strategy:
|
||||
matrix:
|
||||
jdk: [8, 11]
|
||||
|
||||
@@ -4,7 +4,7 @@ buildscript {
|
||||
snapshotBuild = version.endsWith('SNAPSHOT')
|
||||
milestoneBuild = !(releaseBuild || snapshotBuild)
|
||||
|
||||
springBootVersion = '2.5.3'
|
||||
springBootVersion = '2.4.7'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
org.gradle.parallel=true
|
||||
version=2.6.0-M1
|
||||
version=2.5.2
|
||||
|
||||
@@ -3,9 +3,9 @@ dependencyManagement {
|
||||
mavenBom 'io.projectreactor:reactor-bom:2020.0.10'
|
||||
mavenBom 'org.junit:junit-bom:5.7.2'
|
||||
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'
|
||||
mavenBom 'org.springframework.data:spring-data-bom:2021.0.4'
|
||||
mavenBom 'org.springframework.security:spring-security-bom:5.5.2'
|
||||
mavenBom 'org.testcontainers:testcontainers-bom:1.15.3'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -16,9 +16,9 @@ dependencyManagement {
|
||||
|
||||
dependency 'org.aspectj:aspectjweaver:1.9.7'
|
||||
dependency 'com.h2database:h2:1.4.200'
|
||||
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.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.zaxxer:HikariCP:3.4.5'
|
||||
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
|
||||
dependency 'io.lettuce:lettuce-core:6.1.4.RELEASE'
|
||||
@@ -27,10 +27,10 @@ dependencyManagement {
|
||||
dependency 'junit:junit:4.13.2'
|
||||
dependency 'mysql:mysql-connector-java:8.0.26'
|
||||
dependency 'org.apache.derby:derby:10.14.2.0'
|
||||
dependency 'org.assertj:assertj-core:3.20.2'
|
||||
dependency 'org.hsqldb:hsqldb:2.5.1'
|
||||
dependency 'org.assertj:assertj-core:3.19.0'
|
||||
dependency 'org.hsqldb:hsqldb:2.5.2'
|
||||
dependency 'org.mariadb.jdbc:mariadb-java-client:2.7.4'
|
||||
dependency 'org.mockito:mockito-core:3.11.2'
|
||||
dependency 'org.mockito:mockito-core:3.10.0'
|
||||
dependency 'org.postgresql:postgresql:42.2.23'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2021 the original author or authors.
|
||||
* Copyright 2014-2019 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,8 +432,7 @@ public class DefaultCookieSerializer implements CookieSerializer {
|
||||
|
||||
private String getCookiePath(HttpServletRequest request) {
|
||||
if (this.cookiePath == null) {
|
||||
String contextPath = request.getContextPath();
|
||||
return (contextPath != null && contextPath.length() > 0) ? contextPath : "/";
|
||||
return request.getContextPath() + "/";
|
||||
}
|
||||
return this.cookiePath;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2021 the original author or authors.
|
||||
* Copyright 2014-2019 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2021 the original author or authors.
|
||||
* Copyright 2014-2019 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
|
||||
|
||||
@@ -5,14 +5,6 @@ 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.
|
||||
|
||||
@@ -26,10 +18,28 @@ 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
|
||||
== What's New in 2.0
|
||||
|
||||
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.
|
||||
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]
|
||||
|
||||
[[samples]]
|
||||
== Samples and Guides (Start Here)
|
||||
@@ -146,10 +156,9 @@ 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. 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].
|
||||
|
||||
** Hosts the Spring Session Data MongoDB module
|
||||
* https://github.com/spring-projects/spring-session-data-geode[`spring-session-data-geode` repository]
|
||||
** 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].
|
||||
** Hosts the Spring Session Data Geode and Spring Session Data Geode modules
|
||||
|
||||
Finally, Spring Session now also provides a Maven BOM ("`bill of materials`") module in order to help users with version management concerns:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2021 the original author or authors.
|
||||
* Copyright 2014-2020 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.
|
||||
@@ -68,7 +68,7 @@ final class DatabaseContainers {
|
||||
}
|
||||
|
||||
static PostgreSQLContainer<?> postgreSql() {
|
||||
return new PostgreSQLContainer<>("postgres:13.4");
|
||||
return new PostgreSQLContainer<>("postgres:13.3");
|
||||
}
|
||||
|
||||
static MSSQLServerContainer<?> sqlServer() {
|
||||
|
||||
@@ -9,7 +9,7 @@ dependencyManagement {
|
||||
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.52.0'
|
||||
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.49.1'
|
||||
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'
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#server.servlet.session.timeout=1m
|
||||
spring.h2.console.enabled=true
|
||||
spring.jpa.defer-datasource-initialization=true
|
||||
|
||||
Reference in New Issue
Block a user