org.springframework.web.bind.MissingPathVariableException: Missing URI template variable 'token' for method parameter of type String
spring boot项目中报此错误,可能的原因是
-
在GetMapping中没有指定参数名
@GetMapping("/verifyLogin") public HttpResult verifyLogin(@PathVariable("token") String token)正确的应该是:
@GetMapping("/verifyLogin/{token}") public HttpResult verifyLogin(@PathVariable("token") String token)

浙公网安备 33010602011771号