I have this problem that I show you in the picture
How I can add a string in the request?
This is my method in SpringBoot
I need help to know how I can to add a String ID in the Postman request.
Thank you. Sorry for my English level.
Greetings.
CodePudding user response:
For path /resource/{variableName}, the variableName must be same as the method parameter name or same as the alias in @PathVariable("variableName").
In your case, just change the mapping to @GetMapping("/coches/{matricula}"). And you should not use "" in request path. Request with /api/coches/1234ABC instead.