宁静的路径是"/user/check/{email}"
。当我传递电子邮件参数(例如"xxxx.com"
)时,路径为"/user/check/xxxx.com"
,并且请求将报告错误,如下所示:
{
"timestamp": "2018-07-03 14:24:04",
"status": 406,
"error": "Not Acceptable",
"exception": "org.springframework.web.HttpMediaTypeNotAcceptableException",
"message": "Could not find acceptable representation",
"path": "/v1/user/isUnique/dsafafds/xxxx.com"
}
无论@requestParam,我都想使用@PathVariable作为电子邮件的参数类型。 您能帮我看看这个问题吗?谢谢!