title: How to keep baseUrl when using uri() in spring webflux
body: <p>Using spring boot 2.1.3.RELEASE, <code>WebClient</code> will stop using the provided <code>baseUrl</code> when passing an <code>URI</code> to <code>uri()</code> method. It will keep <code>baseUrl</code> when a string is passed to <code>uri()</code> though.</p>
  
  <p>How can I provide a <code>baseUrl</code> and pass an <code>URI</code>?</p>
  
  <pre><code>public WebClient webClient() {
    return WebClient.builder()
      .baseUrl("https://example.com/")
      .build();
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>webClient.get().uri(URI.create("/foo/%23bar"))... 
  </code></pre>
  
  <p>throws </p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: URI is not absolute:</p>
  </blockquote>
  
  <p>and the request url becomes </p>
  
  <pre><code>request url: /foo/%23bar
  </code></pre>