如何在 Postman 的 findById 方法中添加一个字符串?

How to add a String in the method findById in Postman?

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

This is the error

I edit the question to show this important picture. This is my table and "matricula" is a String and it is my ID

我需要帮助了解如何在 Postman 请求中添加字符串 ID。

谢谢。对不起我的英语水平。

你好。

对于路径/resource/{variableName},variableName必须与方法参数名称相同或与@PathVariable("variableName") 中的别名相同。

对于您的情况,只需将映射更改为@GetMapping("/coches/{matricula}")。并且您不应该在请求路径中使用“”。改为请求 /api/coches/1234ABC