gpt4 book ai didi

java - 是否可以在 Spring MVC 中进行自动 url 映射?

转载 作者:搜寻专家 更新时间:2023-11-01 03:09:39 26 4
gpt4 key购买 nike

是否可以在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com