Commit Graph

193 Commits

Author SHA1 Message Date
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
Vedran Pavic
fb66cf3150 Remove @Configuration meta-annotation from @Enable*Session annotations
Closes gh-1361
2022-09-22 16:13:16 -05:00
Vedran Pavic
e050a92fad Restructure Redis HttpSession configuration support
This commit restructures configuration support for Redis-backed
HttpSession with aim to enable users to easily select the
SessionRepository implementation they prefer to use.

This is achieved by introducing [at]EnableRedisIndexedHttpSession
annotation that can be used to configure RedisIndexedSessionRepository,
while the existing [at]EnableRedisHttpSession will going forward
configure RedisSessionRepository as the SessionRepository implementation
used by Spring Session.

Additionally, this also introduces AbstractRedisHttpSessionConfiguration
as the base configuration class that manages common aspects of
Redis-backed HttpSession support, which is then extended by more
specific configuration classes that provide specific SessionRepository
implementation.

Closes gh-2122
2022-09-07 09:46:55 -05:00
Vedran Pavic
0c1dbc7355 Revert "Use simple Redis repository by default"
This reverts commit 8582b970

See gh-2122
2022-09-07 09:46:55 -05:00
Vedran Pavic
8e8de48614 Fix deprecation warnings 2022-09-06 15:27:53 -05:00
Vedran Pavic
9524730ab1 Update integration tests
This commit updates Docker images used in all the integration tests. Additionally, it updates JDBC session repository Oracle integration tests to run unconditionally.
2022-08-30 21:48:39 -05:00
Vedran Pavic
de57f2cd14 Remove deprecated code in spring-session-data-redis 2022-08-19 13:31:44 -05:00
Marcus Da Coregio
00d248b0b5 Fix failing tests
Issue gh-2107
2022-07-08 11:07:02 -03:00
Eleftheria Stein
221b48094a Upgrade test dependencies 2022-04-19 17:59:17 +02:00