201 Commits

Author SHA1 Message Date
Rob Winch
8fb90fd765 SessionEventRegistry doneWaiting if result found
Previously doneWaiting was only computed based upon the time rather than if
the result was found.

Issue gh-3398
2025-05-20 12:20:20 -05:00
Rob Winch
19d7c03b82 Fix Race Condition in Integration Tests Using Redis SessionEventRegistry
Closes gh-3398
2025-05-20 11:32:15 -05:00
Marcus Hert Da Coregio
d816bb1002 Merge branch '3.2.x' into 3.3.x 2024-08-21 08:43:21 -03:00
Marcus Hert Da Coregio
ad333a49af Bump io.spring.javaformat:spring-javaformat-checkstyle from 0.0.42 to 0.0.43 2024-08-21 08:43:05 -03:00
Marcus Hert Da Coregio
21260787d3 Polish
Closes gh-2917
2024-05-13 10:46:47 -03:00
Stephen Kinser
44a6da43fa Redis reads session once not twice during cleanup
I noticed that the session gets read twice at 4dc81ec10d/spring-session-data-redis/src/main/java/org/springframework/session/data/redis/ReactiveRedisIndexedSessionRepository.java (L441-L442). This alters the code to only read it once.
2024-05-13 10:41:21 -03:00
oliviarla
112239f630 Fix typos 2024-04-30 10:03:16 -03:00
Marcus Da Coregio
e65da12d82 Add ReactiveRedisIndexedSessionRepository
Closes gh-2700
2023-12-27 08:59:38 -03:00
Marcus Hert Da Coregio
587eb7bd9c Merge branch '3.1.x' into 3.2.x 2023-12-12 10:20:24 -03:00
Marcus Hert Da Coregio
bde989f543 Do not use mock for Rename Operation Exception Test
Issue gh-2645
2023-12-12 10:17:29 -03:00
Marcus Hert Da Coregio
8df96baef3 Merge branch '3.1.x' 2023-11-20 09:54:00 -03:00
Marcus Hert Da Coregio
65554184a5 Merge branch '3.0.x' into 3.1.x 2023-11-20 09:53:20 -03:00
Marcus Hert Da Coregio
8e3ea44d77 Try fixing flaky test by replacing BDDMockito with regular Mockito
Issue gh-2645
2023-11-20 09:53:13 -03:00
Marcus Da Coregio
4e63eae0aa Merge branch '3.1.x'
Closes gh-2530
2023-10-19 10:35:43 -03:00
Marcus Da Coregio
44330c5107 Merge branch '3.0.x' into 3.1.x
Closes gh-2529
2023-10-19 10:34:23 -03:00
Marcus Da Coregio
2b69cff478 Update spring-javaformat to 0.0.39
Closes gh-2528
2023-10-19 10:33:00 -03:00
Marcus Da Coregio
bbaa277a23 Merge branch '3.0.x' into 3.1.x 2023-10-18 14:38:38 -03:00
Marcus Da Coregio
cf1827a56d Move tests to dynamic configuration tests
(cherry picked from commit bf5f04f40c)
2023-10-18 14:38:26 -03:00
Marcus Da Coregio
bf5f04f40c Move tests to dynamic configuration tests 2023-10-18 13:31:13 -03:00
Marcus Da Coregio
d1a4155190 Improve mocking on tests 2023-10-18 11:32:12 -03:00
Marcus Da Coregio
27782d659b Merge branch '3.1.x'
Closes gh-2492
2023-10-18 11:07:52 -03:00
Marcus Da Coregio
dfd21865cd Merge branch '3.0.x' into 3.1.x
Closes gh-2491
2023-10-18 11:05:48 -03:00
Marcus Da Coregio
047839e3f2 Use Gradle Version Catalog
Closes gh-2490
2023-10-18 11:01:56 -03:00
Marcus Da Coregio
c90133890d Fix tests
Issue gh-2464
2023-10-16 12:01:04 -03:00
Marcus Da Coregio
5330cd4b06 Merge branch '3.1.x'
Closes gh-2472
2023-10-16 10:49:00 -03:00
Marcus Da Coregio
d53d5a8f4c Merge branch '3.0.x' into 3.1.x
Closes gh-2471
2023-10-16 10:48:49 -03:00
Marcus Da Coregio
d6294a13a7 Merge branch '2.7.x' into 3.0.x
Closes gh-2470
2023-10-16 10:48:37 -03:00
Marcus Da Coregio
5614a7d765 Fix Reactive Redis Sessions Never Expiring
Prior to this commit, we were using Mono#and(Mono) to execute operations sequentially on Redis. However, the and(...) operator does not guarantee that the operations will run sequentially. This commit changes from Mono#and to Mono#flatMap

Closes gh-2464
2023-10-16 10:47:55 -03:00
Marcus Da Coregio
3fe23375de Allow Customizing Redis Session Mapper
Closes gh-2021
2023-10-04 11:34:09 -03:00
Yanming Zhou
11ce4b4561 Polishing
1. fix deprecations
2. fix generics
3. use lambda instead of anonymous class
4. mark some fields as final
2023-10-03 10:24:29 -03:00
limo520
c625e8a5bc Update RedisIndexedSessionRepository javadoc
it seems there is a missing ":" in RedisIndexedSessionRepository javadoc.
2023-09-25 12:20:22 +01:00
Yanming Zhou
f7662b03b3 Continue renaming SessionIdGenerationStrategy to SessionIdGenerator 2023-08-16 11:26:30 -03:00
Marcus Da Coregio
21ab473b2a Do not block when generating redis session id
Closes gh-2393
2023-08-10 11:54:42 -03:00
Marcus Da Coregio
2d4233fcfd Rename SessionIdGenerationStrategy to SessionIdGenerator
Closes gh-2391
2023-08-03 13:44:42 -03:00
Marcus Da Coregio
d547b33962 Introduce SessionIdGenerationStrategy
Closes gh-11
2023-07-13 09:48:44 -03:00
Marcus Da Coregio
64a1160dd0 Merge branch '3.0.x'
Closes gh-2309
2023-06-06 15:23:54 -03:00
Marcus Da Coregio
ef733e048e Merge branch '2.7.x' into 3.0.x
Closes gh-2308
2023-06-06 15:23:47 -03:00
Marcus Da Coregio
ffe7fd39e6 Ignore failed rename operation when key does not exists in Reactive
Closes gh-2281
2023-06-06 15:23:19 -03:00
Marcus Da Coregio
d3d3ea1736 Merge branch '3.0.x'
Closes gh-2307
2023-06-06 15:21:49 -03:00
Marcus Da Coregio
41eb118940 Merge branch '2.7.x' into 3.0.x
Closes gh-2306
2023-06-06 15:21:32 -03:00
Marcus Da Coregio
180cf6275f Improve handling of failed rename operation
Consider messages that starts with "ERR no such key".
Some Redis clients like Redisson might change the message to include more details

Closes gh-1743
2023-06-06 15:19:58 -03:00
Yanming Zhou
588586142c Reuse StringRedisSerializer instance 2023-04-05 11:02:35 -03:00
Eddú Meléndez
0dfc97289f Polish related to testcontainers
* Use getHost instead of getContainerIpAddress
* Rely on OracleContainer and it's improvements which involve the log
wait strategy
2023-01-23 13:47:59 -03:00
Vedran Pavic
668f85788a Avoid inheritance in configuration classes
This commit restructures configuration classes to avoid inheritance, where possible. This should provide more flexibility when composing custom configurations.

Closes gh-1415
2022-10-17 21:52:58 -05:00
Vedran Pavic
009cb5b592 Fix max inactive interval setters backwards compatibility
This commit restores integer based max inactive interval setters across all session repositories, that were migrated to java.time in 6d74cf5f.

This change caused problems building our Spring Boot based samples, as Spring Boot auto-configuration has move to session repository customizer based approach and is therefore using max inactive interval setters directly on session repository implementations.
2022-10-07 07:56:25 -05:00
Vedran Pavic
b5197b8665 Polish RedisIndexedSessionRepository
This commit addresses code warnings due to nullability of return values.
2022-10-06 10:28:11 -05:00
Vedran Pavic
2406ec8302 Fix SessionCreatedEvent handling in RedisIndexedSessionRepository
At present, RedisIndexedSessionRepository publishes a SessionCreatedEvent backed by an empty MapSession instance. This happens because session delta has been cleared before publishing a message to the session created channel.

Fixes gh-1338
2022-10-06 10:28:11 -05:00
Vedran Pavic
6d74cf5f35 Use java.time in all session repositories and configurations
This commit reworks all session repository implementations and their respective configurations to use java.time for managing maxInactiveInterval and other temporal values.
2022-10-06 10:26:50 -05:00
Vedran Pavic
da8e5fbbac Ensure configuration classes can be used with @Import
This commit adds tests that verify that all Spring Session configuration classes can be used with @Import, and fixes JDBC and Hazelcast HttpSession configurations and Redis WebSession configuration.
2022-09-26 09:01:09 -05:00
Vedran Pavic
954a40f5d1 Simplify expired session cleanup jobs
At present, RedisIndexedHttpSessionConfiguration and JdbcHttpSessionConfiguration include [at]EnableScheduling annotated inner configuration classes that configure expired session cleanup jobs. This approach silently opts in users into general purpose task scheduling support provided by Spring Framework, which isn't something a library should do. Ideally, session cleanup jobs should only require a single thread dedicated to their execution and also one that doesn't compete for resources with general purpose task scheduling.

This commit updates RedisIndexedSessionRepository and JdbcIndexedSessionRepository to have them manage their own ThreadPoolTaskScheduler for purposes of running expired session cleanup jobs.

Closes gh-2136
2022-09-23 15:23:29 -05:00