3

I have this interface mapping my rest client using Spring cloud Feign.

@FeignClient(url = "http://localhost:8080")
public interface RestClient {

    @RequestMapping(value = "?ids={ids}", method = GET)
    List<Posicao> get(@RequestParam(value = "ids") List ids);
}

I have a list in my parameters, calling the client I have this request:

restClient.get(Arrays.asList(1, 2));

http://localhost:8080/ids=1,2,1,2

It's duplicating the list values!

I already tried using an array, an integer and string generic list, but no success.

Rafael Zeffa
  • 2,334
  • 22
  • 20
  • I've duplicated the issue and created an issue: https://github.com/spring-cloud/spring-cloud-netflix/issues/496 – spencergibb Aug 19 '15 at 16:47

1 Answers1

4

Remove ?ids={ids} from @RequestMapping fixes the problem. Only path parameters need to go there.

spencergibb
  • 24,471
  • 6
  • 69
  • 75