2013-04-15 42 views
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映射到哪個Controller。說Spring中的Handler映射與struts中的Action映射相同是否公平?Spring handlerMapping vs struts ActionMapping

回答

0

Hanler Mapping and ActionMapping take the same role in 2 MVC framworks。他們甚至可以將不同的URL導航到控制器。就像Spring MVC的愛好者一樣,它比Struts在你的項目中更容易使用。春天傢伙「convention over configuration」爲您提供默認的處理程序映射,因此您無需在配置中指定它,並且它還提供@HandlerMapping and Handler Adapter以幫助您進行導航。