What is the function of Spring Session?

徘徊边缘 提交于 2019-12-08 03:09:27

To put it simple, Spring Session project provides infrastructure for managing user's session.

Most notably, this includes replacing the HttpSession implementation provided by your Servlet container (e.g. Tomcat) with an implementation provided by Spring Session which is then persisted using SessionRepository implementation of your choice (Redis, Gemfire, Hazelcast, JDBC, Mongo are supported backends in current 1.2.0.RELEASE). This ensures your sessions are stored in container/platform agnostic way and makes session clustering very easy.

Additionally, Spring Session provides some other nice features such as:

  • configurable strategies for correlating user's requests with a session (either cookie or HTTP request header based)
  • support for multiple sessions in a single browser instance
  • WebSocket integration, meaning the HttpSession is kept alive when consuming only WebSocket
  • ability to retrieve all the sessions for a given user

For more information please take a look at Spring Session's user manual as it contains detailed guides which describe the most common use cases.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!