Spring mvc 3 Web 应用程序设计
在 Spring MVC 应用程序中,我使用一个独特的控制器,用户在其中填充会话信息(我使用 @SessionAttributes("Form") )。
1) It looks that it works fine, but is it the right way to do things ?
2) I would like to share some data between users, how could I do that ?
In a Spring MVC app, I use a unique controller where users populate info of their session (I'm using @SessionAttributes("Form") ).
1) It looks that it works fine, but is it the right way to do things ?
2) I would like to share some data between users, how could I do that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不呢,你说它适合你,而且简单干净。使用一个控制器是可以的,直到方法的数量不是太多,然后简单地拆分类创建一个新的控制器,尝试对请求映射进行逻辑分组。
将其保存在数据库中。
why not, you said it works for you, and is simple and clean. Using one controller is fine until the number of methods aren't too many, after that simple split the class creating a new controller, trying to group Request Mappings logically.
save it in a database.