1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.bremersee.apiclient.webflux.contract.spring;
18
19 import org.bremersee.apiclient.webflux.Invocation;
20 import org.springframework.util.LinkedMultiValueMap;
21 import org.springframework.util.MultiValueMap;
22 import org.springframework.web.bind.annotation.RequestParam;
23
24
25
26
27
28
29 public class RequestParametersResolver implements QueryParametersResolver {
30
31 @Override
32 public MultiValueMap<String, Object> apply(Invocation invocation) {
33 return invocation.toMethodParameterStream()
34 .map(invocationParameter -> invocationParameter.toMultiValueMap(
35 RequestParam.class,
36 RequestParam::value,
37 v -> v))
38 .collect(
39 LinkedMultiValueMap::new,
40 LinkedMultiValueMap::putAll,
41 LinkedMultiValueMap::putAll);
42 }
43 }