0

我来自 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 映射是一样的公平吗?

4

1 回答 1

0

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了帮助你做导航。

于 2013-04-15T05:17:02.680 回答