• Convenient, but hard to evolve and maintain • Spring Session 2.0 is JAR per session store • Arrangement similar to Spring Data • Community extensions are welcome • Dedicated section in reference manual • Spring Boot and Initializr impact
• e.g. @EnableRedisHttpSession vs @EnableRedisWebSession • Much simpler than Servlet support • Key APIs are a part of spring-web • Redis & MongoDB session stores
• Configuration improvements • Qualifier annotations for data stores • Data access components (e.g. RedisTemplate, JdbcTemplate) no longer registered as beans
spring-session JAR doesn’t exist in 2.0 • spring-session-data-mongo → spring-session-data-mongodb • Adapt to core API changes • Session, SessionRepository • Adapt to session resolution changes • HttpSessionStrategy → HttpSessionIdResolver • removed support for multiple sessions in a single browser
to reuse • @EnableSpringHttpSession & @EnableSpringWebSession • Implementing session repository • Beware of race conditions - optimize session writes • Take care to purge the expired sessions • Support session event publishing, if possible • Provide supporting configuration classes
Gitter chat • https://gitter.im/spring-projects/spring-session • Stack Overflow tag • https://stackoverflow.com/questions/tagged/spring-session • From Zero to Open Source Hero @ Spring I/O 2017 • https://www.youtube.com/watch?v=D7OJFWNx-ks