2
我有AA userPanel
方法映射到/user/panel
URL路径:如何将两个URL路由映射到Spring MVC(3.0)中的相同处理程序方法?
@RequestMapping(value = "/user/panel", method = RequestMethod.GET)
public final String userPanel(HttpServletRequest request, ModelMap model)
不过,我也很喜欢userPanel
方法来处理路线/panel
而无需创建一个单独的方法,像这样:
@RequestMapping(value = "/panel", method = RequestMethod.GET)
public final String panel(HttpServletRequest request, ModelMap model)
有没有办法让userPanel
方法处理两条路线以避免重复?