Compare commits

..

26 Commits

Author SHA1 Message Date
Eleftheria Stein
840907993b Release 2.6.3 2022-04-19 17:37:41 +02:00
Eleftheria Stein
4db41c1caf Upgrade Spring Data to 2021.1.4
Closes gh-2058
2022-04-19 15:41:20 +02:00
Eleftheria Stein
f4840e98a2 Upgrade test dependencies 2022-04-19 12:27:09 +02:00
Eleftheria Stein
8c99c9f904 Upgrade Spring Security to 5.6.3
Closes gh-2064
2022-04-19 12:26:40 +02:00
Eleftheria Stein
f70f1f20f9 Upgrade Reactor to 2020.0.18
Closes gh-2065
2022-04-19 12:25:20 +02:00
Eleftheria Stein
ac1a77e5fe Upgrade Jackson to 2.13.2.20220328
Closes gh-2066
2022-04-19 12:21:58 +02:00
Eleftheria Stein
214a556dd4 Upgrade Spring Framework to 5.3.19
Closes gh-2063
2022-04-19 12:21:22 +02:00
Eleftheria Stein
cace484fbe Upgrade samples to Spring Boot 2.6.6
Closes gh-2067
2022-04-19 12:20:16 +02:00
Felix Scheinost
24c198fe98 Fix bug in JDBC SaveMode.ON_GET_ATTRIBUTE 2022-04-08 17:50:51 +02:00
Eleftheria Stein
2c1b79375d Upgrade samples to Spring Boot 2.6.5
This also makes the necessary changes for the Thymeleaf Layout Dialect 3.0 update.

Closes gh-1980
2022-03-29 15:33:08 +02:00
Eleftheria Stein
fba9313c6b Document release process for 2.6.x
Issue gh-2036
2022-02-23 14:22:25 +01:00
Eleftheria Stein
c2288615bf Update antora to 2.6.3 2022-02-22 14:38:24 +01:00
Eleftheria Stein
ad52fc0297 Next development version 2022-02-22 14:13:29 +01:00
Eleftheria Stein
2516a495af Release 2.6.2 2022-02-22 10:31:00 +01:00
Eleftheria Stein
9be7ac7fa6 Upgrade test dependencies 2022-02-22 10:30:29 +01:00
Eleftheria Stein
c335a49924 Upgrade Hazelcast 4 to 4.2.4
Closes gh-2029
2022-02-22 10:29:20 +01:00
Eleftheria Stein
092e6c6607 Upgrade MongoDB to 4.4.2
Closes gh-2034
2022-02-22 10:28:02 +01:00
Eleftheria Stein
0924c9558a Upgrade Reactor to 2020.0.16
Closes gh-2031
2022-02-22 10:27:20 +01:00
Eleftheria Stein
0484781541 Upgrade Jackson to 2.13.1
Closes gh-2033
2022-02-22 10:26:38 +01:00
Eleftheria Stein
3995f8bf65 Upgrade Spring Framework to 5.3.16
Closes gh-2028
2022-02-22 10:25:32 +01:00
Eleftheria Stein
ad16f17398 Upgrade Spring Data to 2021.1.2
Closes gh-2032
2022-02-22 10:24:56 +01:00
Eleftheria Stein
11aa50e83c Upgrade Spring Security to 5.6.2
Closes gh-2030
2022-02-22 10:24:32 +01:00
Eleftheria Stein
a0246a61b6 Update to jakarta.servlet-api dependency
Closes gh-1960
2022-01-25 13:26:47 +01:00
Eleftheria Stein
8f20fa328a Update to jakarta.annotation-api dependency
Closes gh-1956
2022-01-25 12:50:29 +01:00
Ruslan Molchanov
12ce8de84e Fix memory leak with null principal in Redis
Closes gh-1987
2022-01-20 10:05:05 +01:00
Eleftheria Stein
dba22292a3 Run CI on all branches 2022-01-05 14:29:57 +02:00
26 changed files with 109 additions and 106 deletions

View File

@@ -1,7 +1,6 @@
name: Generate Antora Files and Request Build
on:
workflow_dispatch: # Manual trigger
push:
branches-ignore:
- 'gh-pages'

View File

@@ -18,19 +18,12 @@ You can manually check at https://github.com/spring-projects/spring-session/mile
== 3. Update Release Version
Update the version number in `gradle.properties` for the release, for example `2.7.0-M1`, `2.7.0-RC1`, `2.7.3`
Update the version number in `gradle.properties` for the release, for example `2.6.0-M1`, `2.6.0-RC1`, `2.6.3`
== 4. Update Antora Version
You will need to update the antora.yml version.
For milestone / release candidate releases you should follow this format:
----
version: '2.7.0-RC1'
prerelease: 'true'
display_version: '2.7.0-RC1'
----
== 5. Build Locally
Run the build using
@@ -50,8 +43,8 @@ Wait for the artifact to appear in https://repo1.maven.org/maven2/org/springfram
Tag the release and then push the tag
....
git tag 2.7.0-RC1
git push origin 2.7.0-RC1
git tag 2.6.3
git push origin 2.6.3
....
== 8. Update to Next Development Version
@@ -76,7 +69,7 @@ java -jar github-changelog-generator.jar \
$MILESTONE release-notes
....
Note 1: `+$MILESTONE+` is something like `+2.7.1+` or `+2.7.0-M1+`. +
Note 1: `+$MILESTONE+` is something like `+2.6.1+` or `+2.6.0-M1+`. +
Note 2: This will create a file on your filesystem
called `+release-notes+`.
@@ -95,13 +88,11 @@ GitHub], associate it with the tag, and paste the generated notes.
* In
https://github.com/spring-projects/spring-session/milestones[GitHub
Milestones], create a new milestone for the next release version.
Milestones], create a new milestone for the next release version
* Move any open issues from the existing milestone you just released to
the new milestone.
* Close the milestone for the release.
Note: Spring Session typically releases only one milestone (M1) and one release candidate (RC1).
== 12. Announce the release
* Announce via Slack on https://pivotal.slack.com/messages/spring-session[#spring-session], and tag any downstream Spring Session projects (e.g Spring Session for Apache Geode).

View File

@@ -4,7 +4,7 @@ buildscript {
snapshotBuild = version.endsWith('SNAPSHOT')
milestoneBuild = !(releaseBuild || snapshotBuild)
springBootVersion = '2.7.0-M3'
springBootVersion = '2.6.6'
}
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.7.0-SNAPSHOT
version=2.6.3

View File

@@ -1,12 +1,12 @@
dependencyManagement {
imports {
mavenBom 'io.projectreactor:reactor-bom:2020.0.15'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.1'
mavenBom 'io.projectreactor:reactor-bom:2020.0.18'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.2.20220328'
mavenBom 'org.junit:junit-bom:5.8.2'
mavenBom 'org.springframework:spring-framework-bom:5.3.15'
mavenBom 'org.springframework.data:spring-data-bom:2021.2.0-M2'
mavenBom 'org.springframework.security:spring-security-bom:5.7.0-M1'
mavenBom 'org.testcontainers:testcontainers-bom:1.16.2'
mavenBom 'org.springframework:spring-framework-bom:5.3.19'
mavenBom 'org.springframework.data:spring-data-bom:2021.1.4'
mavenBom 'org.springframework.security:spring-security-bom:5.6.3'
mavenBom 'org.testcontainers:testcontainers-bom:1.16.3'
}
dependencies {
@@ -15,35 +15,35 @@ dependencyManagement {
entry 'hazelcast-client'
}
dependency 'org.aspectj:aspectjweaver:1.9.7'
dependency 'ch.qos.logback:logback-core:1.2.10'
dependency 'org.aspectj:aspectjweaver:1.9.9.1'
dependency 'ch.qos.logback:logback-core:1.2.11'
dependency 'com.google.code.findbugs:jsr305:3.0.2'
dependency 'com.h2database:h2:1.4.200'
dependency 'com.ibm.db2:jcc:11.5.6.0'
dependency 'com.ibm.db2:jcc:11.5.7.0'
dependency 'com.microsoft.sqlserver:mssql-jdbc:9.4.1.jre8'
dependency 'com.oracle.database.jdbc:ojdbc8:21.4.0.0.1'
dependency 'com.oracle.database.jdbc:ojdbc8:21.3.0.0'
dependency 'com.zaxxer:HikariCP:3.4.5'
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
dependency 'io.lettuce:lettuce-core:6.1.6.RELEASE'
dependency 'io.lettuce:lettuce-core:6.1.8.RELEASE'
dependency 'jakarta.annotation:jakarta.annotation-api:1.3.5'
dependency 'jakarta.servlet:jakarta.servlet-api:4.0.4'
dependency 'mysql:mysql-connector-java:8.0.27'
dependency 'mysql:mysql-connector-java:8.0.28'
dependency 'org.apache.derby:derby:10.14.2.0'
dependency 'org.assertj:assertj-core:3.22.0'
dependency 'org.assertj:assertj-core:3.21.0'
dependency 'org.hamcrest:hamcrest:2.1'
dependency 'org.hsqldb:hsqldb:2.5.2'
dependency 'org.mariadb.jdbc:mariadb-java-client:2.7.4'
dependencySet(group: 'org.mockito', version: '4.2.0') {
dependencySet(group: 'org.mockito', version: '4.0.0') {
entry 'mockito-core'
entry 'mockito-junit-jupiter'
}
dependencySet(group: 'org.mongodb', version: '4.5.1') {
dependencySet(group: 'org.mongodb', version: '4.4.2') {
entry 'mongodb-driver-core'
entry 'mongodb-driver-sync'
entry 'mongodb-driver-reactivestreams'
}
dependency 'org.postgresql:postgresql:42.3.1'
dependency 'org.postgresql:postgresql:42.3.3'
}
}

View File

@@ -6,7 +6,7 @@ pluginManagement {
}
plugins {
id "com.gradle.enterprise" version "3.9"
id "com.gradle.enterprise" version "3.5.1"
id "io.spring.ge.conventions" version "0.0.7"
}

View File

@@ -389,7 +389,7 @@ public abstract class AbstractMongoRepositoryITest extends AbstractITest {
protected static class BaseConfig {
private static final String DOCKER_IMAGE = "mongo:4.4.1";
private static final String DOCKER_IMAGE = "mongo:4.0.10";
@Bean(initMethod = "start", destroyMethod = "stop")
public MongoDBContainer mongoContainer() {

View File

@@ -175,7 +175,7 @@ public class MongoDbDeleteJacksonSessionVerificationTest {
@EnableMongoWebSession
static class Config {
private static final String DOCKER_IMAGE = "mongo:4.4.1";
private static final String DOCKER_IMAGE = "mongo:4.0.10";
@Bean(initMethod = "start", destroyMethod = "stop")
MongoDBContainer mongoContainer() {

View File

@@ -170,7 +170,7 @@ public class MongoDbLogoutVerificationTest {
@EnableMongoWebSession
static class Config {
private static final String DOCKER_IMAGE = "mongo:4.4.1";
private static final String DOCKER_IMAGE = "mongo:4.0.10";
@Bean(initMethod = "start", destroyMethod = "stop")
MongoDBContainer mongoContainer() {

View File

@@ -16,14 +16,19 @@
package org.springframework.session.data.mongo;
import org.springframework.lang.Nullable;
import org.springframework.session.Session;
import java.time.Duration;
import java.time.Instant;
import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import org.springframework.lang.Nullable;
import org.springframework.session.Session;
/**
* Session object providing additional information about the datetime of expiration.
*
@@ -37,7 +42,7 @@ public class MongoSession implements Session {
* Mongo doesn't support {@literal dot} in field names. We replace it with a very
* rarely used character
*/
static final char DOT_COVER_CHAR = '';
private static final char DOT_COVER_CHAR = '';
private String id;
@@ -101,7 +106,8 @@ public class MongoSession implements Session {
if (attributeValue == null) {
removeAttribute(coverDot(attributeName));
} else {
}
else {
this.attrs.put(coverDot(attributeName), attributeValue);
}
}

View File

@@ -39,14 +39,4 @@ public class MongoSessionTest {
assertThat(session.isExpired()).isFalse();
}
@Test
void delombokedDotCoverCharMatchesOriginalUnicodeDotCoverChar() {
char originalDotCoverChar = '\uF607';
char delombokedDotCoverChar = '';
assertThat(MongoSession.DOT_COVER_CHAR).isEqualTo(delombokedDotCoverChar);
assertThat(MongoSession.DOT_COVER_CHAR).isEqualTo(originalDotCoverChar);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 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.
@@ -42,10 +42,7 @@ import org.springframework.util.Assert;
*/
public class RedisSessionRepository implements SessionRepository<RedisSessionRepository.RedisSession> {
/**
* The default namespace for each key and channel in Redis used by Spring Session.
*/
public static final String DEFAULT_KEY_NAMESPACE = "spring:session";
private static final String DEFAULT_KEY_NAMESPACE = "spring:session";
private final RedisOperations<String, Object> sessionRedisOperations;

View File

@@ -9,8 +9,8 @@ content:
- url: https://github.com/spring-io/spring-generated-docs
branches: [spring-projects/spring-session/*]
- url: https://github.com/spring-projects/spring-session
branches: [main,3.0.x,2.6.x]
tags: [ '3.0.*', '2.7.*', '2.6.*','!2.6.0-M*','!2.6.0-RC*','!2.7.0-M1','!3.0.0-M1']
branches: [main,3.0.x]
tags: ['2.6.*','!2.6.0-M*','!2.6.0-RC*']
start_path: spring-session-docs
urls:
latest_version_segment_strategy: redirect:to
@@ -21,7 +21,7 @@ ui:
url: https://github.com/spring-io/antora-ui-spring/releases/download/latest/ui-bundle.zip
snapshot: true
antora:
pipeline:
extensions:
- require: ./antora/extensions/version-fix.js
- require: ./antora/extensions/major-minor-segment.js
- require: ./antora/extensions/root-component-name.js

View File

@@ -1,3 +1,2 @@
name: ROOT
version: '2.7.0'
prerelease: '-SNAPSHOT'
version: '2.6.3'

View File

@@ -3,8 +3,8 @@
const { posix: path } = require('path')
module.exports.register = function({ config }) {
this.on('contentClassified', ({ contentCatalog }) => {
module.exports.register = (pipeline, { config }) => {
pipeline.on('contentClassified', ({ contentCatalog }) => {
contentCatalog.getComponents().forEach(component => {
const componentName = component.name;
const generationToVersion = new Map();
@@ -91,7 +91,6 @@ function createSymbolicVersionAlias (component, version, symbolicVersionSegment,
function computeOut (src, family, version, htmlUrlExtensionStyle) {
let { component, module: module_, basename, extname, relative, stem } = src
if (component === 'ROOT') component = ''
if (module_ === 'ROOT') module_ = ''
let indexifyPathSegment = ''
let familyPathSegment = ''
@@ -121,11 +120,8 @@ function computePub (src, out, family, version, htmlUrlExtensionStyle) {
const pub = {}
let url
if (family === 'nav') {
const component = src.component || 'ROOT'
const urlSegments = component === 'ROOT' ? [] : [component]
if (version) urlSegments.push(version)
const module_ = src.module || 'ROOT'
if (module_ !== 'ROOT') urlSegments.push(module_)
const urlSegments = version ? [src.component, version] : [src.component]
if (src.module && src.module !== 'ROOT') urlSegments.push(src.module)
// an artificial URL used for resolving page references in navigation model
url = '/' + urlSegments.join('/') + '/'
pub.moduleRootPath = '.'
@@ -201,4 +197,4 @@ function no_data(key, value) {
return value ? "__data__" : value;
}
return value;
}
}

View File

@@ -0,0 +1,40 @@
// https://gitlab.com/antora/antora/-/issues/132#note_712132072
'use strict'
const { posix: path } = require('path')
module.exports.register = (pipeline, { config }) => {
pipeline.on('contentClassified', ({ contentCatalog }) => {
const rootComponentName = config.rootComponentName || 'ROOT'
const rootComponentNameLength = rootComponentName.length
contentCatalog.findBy({ component: rootComponentName }).forEach((file) => {
if (file.out) {
file.out.dirname = file.out.dirname.substr(rootComponentNameLength)
file.out.path = file.out.path.substr(rootComponentNameLength + 1)
file.out.rootPath = fixPath(file.out.rootPath)
}
if (file.pub) {
file.pub.url = file.pub.url.substr(rootComponentNameLength + 1)
if (file.pub.rootPath) {
file.pub.rootPath = fixPath(file.pub.rootPath)
}
}
if (file.rel) {
if (file.rel.pub) {
file.rel.pub.url = file.rel.pub.url.substr(rootComponentNameLength + 1)
file.rel.pub.rootPath = fixPath(file.rel.pub.rootPath);
}
}
})
const rootComponent = contentCatalog.getComponent(rootComponentName)
rootComponent?.versions?.forEach((version) => {
version.url = version.url.substr(rootComponentName.length + 1)
})
// const siteStartPage = contentCatalog.getById({ component: '', version: '', module: '', family: 'alias', relative: 'index.adoc' })
// if (siteStartPage) delete siteStartPage.out
})
function fixPath(path) {
return path.split('/').slice(1).join('/') || '.'
}
}

View File

@@ -1,15 +0,0 @@
'use strict'
module.exports.register = function({ config }) {
this.on('contentAggregated', ({ contentAggregate }) => {
contentAggregate.forEach(aggregate => {
if (aggregate.version === "2.6.2" &&
aggregate.prerelease == "-SNAPSHOT") {
aggregate.version = "2.6.2"
aggregate.displayVersion = `${aggregate.version}`
delete aggregate.prerelease
}
})
})
}

View File

@@ -20,7 +20,7 @@ ui:
url: https://github.com/spring-io/antora-ui-spring/releases/download/latest/ui-bundle.zip
snapshot: true
antora:
pipeline:
extensions:
- require: ./antora/extensions/version-fix.js
- require: ./antora/extensions/major-minor-segment.js
- require: ./antora/extensions/root-component-name.js

View File

@@ -28,7 +28,7 @@ dependencies {
}
antora {
antoraVersion = "3.0.1"
antoraVersion = "3.0.0-alpha.8"
arguments = ["--fetch"]
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 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.

View File

@@ -46,7 +46,7 @@ final class DatabaseContainers {
}
static MySQLContainer<?> mySql() {
return new MySQLContainer<>("mysql:8.0.27");
return new MySQLContainer<>("mysql:8.0.28");
}
static OracleContainer oracle() {

View File

@@ -1,17 +1,17 @@
dependencyManagement {
imports {
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.1'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.2.20220328'
}
dependencies {
dependency 'ch.qos.logback:logback-classic:1.2.10'
dependency 'ch.qos.logback:logback-classic:1.2.11'
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:3.56.0'
dependency 'org.slf4j:jcl-over-slf4j:1.7.33'
dependency 'org.slf4j:log4j-over-slf4j:1.7.33'
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.52.0'
dependency 'org.slf4j:jcl-over-slf4j:1.7.36'
dependency 'org.slf4j:log4j-over-slf4j:1.7.36'
dependency 'org.webjars:bootstrap:2.3.2'
dependency 'org.webjars:html5shiv:3.7.3-1'
dependency 'org.webjars:jquery:3.6.0'

View File

@@ -5,4 +5,4 @@ logging:
spring:
mongodb:
embedded:
version: 3.4.3
version: 3.0.0

View File

@@ -1,4 +1,4 @@
spring.thymeleaf.cache=false
spring.template.cache=false
spring.data.mongodb.port=0
spring.mongodb.embedded.version=3.4.3
spring.mongodb.embedded.version=3.0.0

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 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.
@@ -38,7 +38,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
*
* @author Rob Winch
*/
@Entity(name = "custom_user")
@Entity
public class User implements Serializable {
@Id

View File

@@ -1,5 +1,5 @@
insert into custom_user(id,email,password,first_name,last_name) values (0,'rob','password','Rob','Winch');
insert into custom_user(id,email,password,first_name,last_name) values (1,'luke','password','Luke','Taylor');
insert into custom_user(id,email,password,first_name,last_name) values (2,'eve','password','Luke','Taylor');
insert into user(id,email,password,first_name,last_name) values (0,'rob','password','Rob','Winch');
insert into user(id,email,password,first_name,last_name) values (1,'luke','password','Luke','Taylor');
insert into user(id,email,password,first_name,last_name) values (2,'eve','password','Luke','Taylor');
update custom_user set password = '$2a$10$FBAKClV1zBIOOC9XMXf3AO8RoGXYVYsfvUdoLxGkd/BnXEn4tqT3u';
update user set password = '$2a$10$FBAKClV1zBIOOC9XMXf3AO8RoGXYVYsfvUdoLxGkd/BnXEn4tqT3u';