1
我有两个方法,这是冲突暧昧的处理方法为映射HTTP路径
1. @RequestMapping(value = { "/{name}" }, method = RequestMethod.GET)
void foo1(@PathVariable("name") final String name)
2. @RequestMapping(value = { "/{email}" }, method = RequestMethod.GET)
void getTemplateVersionsBySenderForClient(@PathVariable("email") final String email,
@RequestParam(value = "timestamp", required = true) final long timestamp)
我如何避免这种情况?
作为用户,您如何区分这两个映射?你最好提供语义上重要的URI(/ name/{name}和/ email/{email}) –