美文网首页
Spring与Struts的区别

Spring与Struts的区别

作者: 不想当菜鸟了 | 来源:发表于2019-04-01 21:01 被阅读0次

1.实现机制:

struts是基于过滤器实现,springMVC是基于Servlet

2.运行速度:

struts是多例的,springMVC是单例的(每一次请求,都会创建一个Action对象

请求来了以后,struts2创建多少个对象:ActionContext,valuestack,UAction,ActionSuport,ModelDriven。 同一个Controller请求,只会创建一个Controller

)springMVC比struts速度快

3.参数封装来分析:

struts基于属性进行封装,Action有参数属性。

springMVC基于方法封装,参数是写在Controller的方法里。

相关文章

网友评论

      本文标题:Spring与Struts的区别

      本文链接:https://www.haomeiwen.com/subject/vxwbbqtx.html