Spring Session 2.0.0 Released

Releases | Rob Winch | January 16, 2018 | ...

This post was authored by Vedran Pavić

On behalf of the community I’m pleased to announce the release of Spring Session 2.0.0.RELEASE. This release evolved through 2.0.0.M1, 2.0.0.M2, 2.0.0.M3, 2.0.0.M4, 2.0.0.M5, 2.0.0.RC1, 2.0.0.RC2 and 2.0.0.RELEASE, closing over 130 issues and pull requests in total.

What’s New in Spring Session 2.0

You can find highlights of what’s new in the What’s New 2.0 section of the reference. For details refer to the changelog links above.

Requirements

This release moves to Java 8 and Spring Framework 5.0 as baseline requirements. Entire codebase is based on Java 8 source code level now.

Spring WebFlux Support

Introduction of reactive programming model in Spring Framework 5.0 has been one of the biggest stories in 2017, and we’re happy to bring the support for managing Spring WebFlux’s WebSession with Redis ReactiveSessionRepository.

In a familiar Spring Session fashion, enabling Redis backed WebSession support is as simple as the following code snippet:

@EnableRedisWebSession
public class WebSessionConfig {

    @Bean
    public LettuceConnectionFactory redisConnectionFactory() {
        return new LettuceConnectionFactory();
    }

}

Spring Boot users will be happy to learn that auto-configuration support for reactive Spring Session is already available since the 2.0.0.M6 milestone release.

Spring Session Modules

The new release bring some major changes to project’s modules, as we have split Spring Session into modules based upon the repository implementation. You will find:

<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-core</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-data-redis</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-hazelcast</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-jdbc</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>

As a part of this change, we have removed some of the Spring Session implementations from the main repository. We now have sub projects for Spring Session Data Geode (GemFire) and Spring Session Data MongoDB. You will find:

<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-data-gemfire</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-data-geode</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.session</groupId>
    <artifactId>spring-session-data-mongodb</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>

The goal is to allow the core Spring Session team to focus on delivering new features rather than needing to know the ins and outs of every data store. This will allow development of other modules to be done without the overhead of reviews from the core Spring Session team.

Contributions

Without the community we couldn’t be the successful project we are today. I’d like to thank everyone that created issues & provided feedback.

Feedback Please

If you have feedback on this release, I encourage you to reach out via StackOverflow, GitHub Issues, or via the comments section. You can also ping Rob @rob_winch, Joe @joe_grandja, or me @vedran_pavic on Twitter.

Of course the best feedback comes in the form of contributions.

Project Site | Reference | Help

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all