Spring MVC 休息操作
我是 Web 开发的新手,尤其是 Spring MVC 框架。我创建了一个控件,它接受 JSON 格式的用户请求。 用户操作非常简单,创建、更新、删除等。 在每次请求中,用户发送其密码,经过身份验证后,处理该操作。 我想知道在这种情况下是否有一种方法可以与客户端创建某种会话,这样客户端只能进行一次身份验证,然后他就可以执行各种操作,例如更新、查询等。他完成了,他会发送一个关闭会话的请求,当然,一旦最后一个操作完成,也会启动超时。
问题是,Sprin MVC 是否提供此功能,如果不提供,其他框架是否提供? 最重要的是,这是在这种情况下处理用户操作的正确方法吗?
I'm new to web develoment, and the Spring MVC framework in particular. I created a controlle, which accept user requests in JSON format.
the user operations are quite simple, create, update, delete, etc.
in each request, the user sends his password, and after authentication, the operation is handled.
I wanted to know if there's a way in this scenario to create sort of a session with the client, so the client can authenticate only once, and then he'll be able to do various operations, such as updates,queries, etc. when he's done, he'll send a request to close the session, and of course, a timeout will be also initiated once the last operation was done.
The question is, Does Sprin MVC offer this functionality, if not which other frameworks do ?
and above all, is this the proper way to handle user operations in that scenario ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为 Spring MVC 或 Spring Core 提供了这样的机制。你最好的选择是尝试 Spring Security (参考手册)。
I don't think Spring MVC or Spring Core provides such a mechanism. Your best bet would be to try Spring Security (reference manual).