For the latest stable version, please use Spring Session 3.4.0!spring-doc.cn

Upgrading to 2.x

With the new major release version, the Spring Session team took the opportunity to make some non-passive changes. The focus of these changes is to improve and harmonize Spring Session’s APIs as well as remove the deprecated components.spring-doc.cn

Baseline Update

Spring Session 2.0 requires Java 8 and Spring Framework 5.0 as a baseline, since its entire codebase is now based on Java 8 source code. See Upgrading to Spring Framework 5.x for more on upgrading Spring Framework.spring-doc.cn

Replaced and Removed Modules

As a part of the project’s splitting of the modules, the existing spring-session has been replaced with the spring-session-core module. The spring-session-core module holds only the common set of APIs and components, while other modules contain the implementation of the appropriate SessionRepository and functionality related to that data store. This applies to several existing modules that were previously a simple dependency aggregator helper module. With new module arrangement, the following modules actually carry the implementation:spring-doc.cn

Also, the following were removed from the main project repository:spring-doc.cn

Replaced and Removed Packages, Classes, and Methods

The following changes were made to packages, classes, and methods:spring-doc.cn

  • ExpiringSession API has been merged into the Session API.spring-doc.cn

  • The Session API has been enhanced to make full use of Java 8.spring-doc.cn

  • The Session API has been extended with changeSessionId support.spring-doc.cn

  • The SessionRepository API has been updated to better align with Spring Data method naming conventions.spring-doc.cn

  • AbstractSessionEvent and its subclasses are no longer constructable without an underlying Session object.spring-doc.cn

  • The Redis namespace used by RedisOperationsSessionRepository is now fully configurable, instead of being partially configurable.spring-doc.cn

  • Redis configuration support has been updated to avoid registering a Spring Session-specific RedisTemplate bean.spring-doc.cn

  • JDBC configuration support has been updated to avoid registering a Spring Session-specific JdbcTemplate bean.spring-doc.cn

  • Previously deprecated classes and methods have been removed across the codebasespring-doc.cn

Dropped Support

As a part of the changes to HttpSessionStrategy and its alignment to the counterpart from the reactive world, the support for managing multiple users' sessions in a single browser instance has been removed. The introduction of a new API to replace this functionality is under consideration for future releases.spring-doc.cn