Spring handlerMapping vs struts ActionMapping

时间:2013-04-15 02:50:49

标签: spring-mvc struts spring-portlet-mvc

我来自struts背景,我正在尝试使用我的struts知识作为基础来学习Spring MVC。在这里他们解释处理程序映 http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/portlet.html#portlet-handlermapping 现在在struts中,我们有一个xml,我们在其中定义动作映射,它基本上表示哪个动作URL映射到哪个Controller。可以公平地说,Spring中的Handler Mapping与struts中的Action映射相同吗?

1 个答案:

答案 0 :(得分:0)

<强> Hanler Mapping and ActionMapping take the same role in 2 MVC framworks 即可。他们甚至通过方法将不同的URL导航到控制器。就像Spring MVC的狂热爱好者一样,它比你项目中的Struts更容易使用。 Spring“convention over configuration”为您提供了一个默认的Handler Mapping,因此您无需在配置中指定它,它还提供@HandlerMapping and Handler Adapter来帮助您进行导航。

相关问题