title: http security config for tls and Oauth2 in the same method
body: <p>I want to make a config file to configure TLS and Oauth2 in my SecureConfig.java</p>
  <p>The tls config:</p>
  <pre><code>@Override
  protected void configure(HttpSecurity http) throws Exception {
      http.authorizeRequests().anyRequest().authenticated().and().sessionManagement()
              .sessionCreationPolicy(SessionCreationPolicy.NEVER);
  }
  </code></pre>
  <p>The Oauth2.0 config:</p>
  <pre><code>@Override
  protected void configure(HttpSecurity http) throws Exception {
      http.csrf().disable()
              .requiresChannel()
              .anyRequest()
              .requiresSecure();
  }
  </code></pre>
  <p>What is the better way to use these two in the same config file and method? Does  the and() work fine?</p>
  <p>Like that:</p>
  <pre><code>    @Override
  protected void configure(HttpSecurity http) throws Exception {
      http.csrf().disable().authorizeRequests().anyRequest().authenticated().and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).and()
              .requiresChannel()
              .anyRequest()
              .requiresSecure();
  }
  </code></pre>