How to consume basic-authentication protected Restful web service via feign client : <p>Thank you for your time.
To make it simple, I created a example service like below:</p>

<pre><code>@RestController
@RequestMapping("/")
public class ComputeController {

    @GetMapping("/add")
    public int add(@RequestParam("left") int left, @RequestParam("right") int right) {
        return left + right;
    }
}
</code></pre>

<p>To protected this url, I config spring-security like this:</p>

<pre><code>management.security.enabled=true
security.user.name=admin
security.user.password=admin
</code></pre>

<p>When I startup this service and access like this:</p>

<pre><code>GET /add?left=100&amp;right=11 HTTP/1.1
Authorization: ***** Hidden credentials *****
Host: localhost:7777
Connection: close
</code></pre>

<p>Everythis is going fine.</p>

<p>In other node, I created a "service-comsumer" by netflix feign. It's a Java Interface.</p>

<pre><code>@FeignClient(name = "API-GATEWAY", path = "/compute-service", fallback = ComputeServiceCircuitBreaker.class)
public interface ComputeServiceClient {

    @RequestMapping(path = "/add", method = RequestMethod.GET)
    public Integer add(@RequestParam("left") Integer left, @RequestParam("right") Integer right);
}
</code></pre>

<p>But I DO NOT know how to config the request header "Authorization".</p>

<p>Any idea? Thanks again.</p>
