Use Spring MVC for Stateless web application development

空扰寡人 提交于 2019-12-01 08:54:18

问题


I come from Play!framework. Very much like it's stateless architecture. Say the session concept is different from the class Java Servlet's HttpSession. Session in Play can store very limited string typed attributes, which is serialized to the browser. Any stateful object is stored either in cache (which can be easily distributed with memcached impl) or database directly. User app can get the stateful objects via a unique session id. This structure makes it very easy to implement a cluster of Play's application.

I am curious how to implement such a stateless application in Spring MVC framework. At the moment what I am thinking of is whenever an new request incoming generate a unique ID and put it into the cookie to mimic Play's stateless session. But looks a bit ugly. Any more idea?

来源:https://stackoverflow.com/questions/20433261/use-spring-mvc-for-stateless-web-application-development

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