是否可以在Spring MVC中进行自动URL映射?例如,url http://localhost/eshop/products
在没有显式@RequestMapping的情况下调用eshop模块中的ProductsController。系统应该知道第一个参数是一个模块而第二个参数是一个控制器。每次创建新控制器时,我都不想在web.xml或@RequestMapping中进行任何更改。
答案 0 :(得分:3)
请检查此链接 http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch16s10.html
使用Spring MVC进行配置的约定