且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Spring中存储数据是会话范围

更新时间:2023-02-25 20:10:32

在我看来,用户对象的问题在于类 User 没有实现 Serializable代码>.

From my point of view the problem with the user object lies on the fact that the class User does not implementing Serializable.

关于 WebRequest,它基本上是 NativeWebRequestAsyncWebRequest 的抽象,正如您在 文档:

And regarding the WebRequest, it is basically an abstraction for NativeWebRequest and AsyncWebRequest, as you can see at the documentation:

Web 请求的通用接口.主要用于通用网络请求拦截器,让他们可以访问通用请求元数据,不用于实际处理请求.

Generic interface for a web request. Mainly intended for generic web request interceptors, giving them access to general request metadata, not for actual handling of the request.

采用这种方法,WebRequestInterceptor 可用于 Servlet 和 Portlet 请求,如 文档:

一般网页请求拦截的接口.允许被应用于 Servlet 请求以及 Portlet 请求环境,通过基于 WebRequest 抽象构建.

Interface for general web request interception. Allows for being applied to Servlet request as well as Portlet request environments, by building on the WebRequest abstraction.