# FeignClient

## PathVariable annotation was empty on param 0.

參考資料:([https://github.com/spring-cloud/spring-cloud-netflix/issues/861](https://github.com/spring-cloud/spring-cloud-netflix/issues/861))

```
Caused by: java.lang.IllegalStateException: PathVariable annotation was empty on param 0.
```

錯誤

```
@RequestMapping(value = "/hello/{name}", method = RequestMethod.GET)
    String hello(@PathVariable String name);
```

正確

```
@RequestMapping(value = "/hello/{name}", method = RequestMethod.GET)
    String hello(@PathVariable(value = "name") String name);
```





