SpringMVC中 @RequestMapping配置多个路径 @PathVariable设置为空(required = false)
在实现发送短信验证码功能的时候,@RequestMapping配置了多个路径。代码如下://发送短信验证码@RequestMapping(value={"/sendSmsVerificationCode/{phoneNumber}","/sendSmsVerificationCode/{phoneNumber}/{phoneAreaCode}"},method=RequestMethod.GET)