title: Spring Boot 2.0 disable default security
body: <p>I want to use Spring Security for JWT authentication. But it comes with default authentication. I am trying to disable it, but the old approach of doing this - disabling it through <code>application.properties</code> - is deprecated in 2.0.</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>@Configuration
  public class StackWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http.httpBasic().disable();
          // http.authorizeRequests().anyRequest().permitAll(); // Also doesn't work.
      }
  }
  </code></pre>
  
  <p>How can I simply disable basic security?</p>
  
  <p><strong>UPDATE</strong><br>
  It might be nice to know that I am not using web mvc but web flux.</p>
  
  <p>Screenshot:<br>
  <a href="https://i.stack.imgur.com/s7L3Q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/s7L3Q.png" alt="Basic login form"></a></p>