官方文檔:http://spring.io/blog/2014/07/08/spring-session-1-0-0-m1-released
1. 優點:
This project provides a number of benefits including:
- Accessing a session from any environment (i.e. web, messaging infrastructure, etc)
- In a web environment
- Support for clustering in a vendor neutral way
- Pluggable strategy for determining the session id
- Easily keep the HttpSession alive when a WebSocket is active
2. 實現:
使用redis集中管理session,jedis作為客戶端。
filter攔截request。
結構如下:
具體實現見web目錄
3. 小結
對於分布式系統的去session,session集中管理,熱部署具有一定的借鑒意義。