Notes on @ pathvariable annotation in springcloud openfeign

SpringCloud-Feign-@PathVariable
Feign pathvariable annotation was empty on param 0.
when using feign, if the parameter contains

@If the parameter is in the form of pathvariable, the corresponding parameter should be marked with value =, otherwise the IllegalStateException exception will be thrown

as

@GetMapping(value = "/payment/consumer/hystrix/ok/get/{id}")
    public String payment_ok(@PathVariable Integer id)

The above code will report feign pathvariable annotation was empty on param 0

    @GetMapping(value = "/payment/consumer/hystrix/ok/get/{id}")
    public String payment_ok(@PathVariable(value="id") Integer id)

So you can go through

Read More: