【问题标题】:Spring handlerMapping vs struts ActionMappingSpring handlerMapping vs struts ActionMapping
【发布时间】:2013-04-15 02:50:49
【问题描述】:

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

【问题讨论】:

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


    【解决方案1】:

    Hanler Mapping and ActionMapping take the same role in 2 MVC framworks。他们将不同的 URL 导航到控制器甚至方法。作为一个 Spring MVC 的爱好者,在你的项目中它比 Struts 更容易使用。 Spring Fellow“convention over configuration”给了你一个默认的Handler Mapping,所以你不需要在配置中指定它,它还提供了@HandlerMapping and Handler Adapter来帮你导航。

    【讨论】:

      猜你喜欢
      • 2011-07-29
      • 1970-01-01
      • 2013-06-26
      • 2022-10-23
      • 1970-01-01
      • 1970-01-01
      • 2013-03-31
      • 2014-10-16
      • 1970-01-01
      相关资源
      最近更新 更多