是否可以在 Spring MVC 中进行自动 url 映射?例如,url http://localhost/eshop/products
调用 eshop 模块中的 ProductsController 而无需显式 @RequestMapping。系统应该知道第一个参数是一个模块,第二个参数是一个 Controller 。我不想在每次创建新 Controller 时都对 web.xml 或 @RequestMapping 进行任何更改。
最佳答案
请检查此链接 http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch16s10.html
使用 Spring MVC 约定优于配置
关于java - 是否可以在 Spring MVC 中进行自动 url 映射?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13414459/