title: Disable security in springBootTest using WebTestClient
body: <p>SpringBoot in 2.1 Release Notes contain the following piece of information:</p>
  
  <blockquote>
    <p>Security configuration is now applied to WebTestClient. For more information on testing secured endpoints, please refer to the relevant section of Spring Security’s reference documentation.</p>
  </blockquote>
  
  <p>Problem:</p>
  
  <p>After updating SpringBoot from <strong>2.0.4</strong> to <strong>2.1.2</strong> I found that my tests have stopped to work. I am using <code>@SpringBootTest</code> for my REST test. My <code>WebTestClient</code> cannot reach server. I did try a lot (e.g. from <a href="https://docs.spring.io/spring-security/site/docs/5.1.x/reference/html5/#test-method-setup" rel="noreferrer">here</a>)
  to mock or disable security and still getting <code>403 FORBIDDEN</code> response.</p>
  
  <p>Do you have any clues what can be wrong?</p>
  
  <p>I create <code>WebTestClient</code> in the following way:</p>
  
  <pre><code>client = WebTestClient
    .bindToServer()
    .baseUrl("http://localhost:$port")
    .build()
  </code></pre>
  
  <p>Also tried to exclude <code>SecurityAutoConfiguration.class</code>.</p>