Wie definiere ich in JavaConfig http "security = 'none'?

Ich möchte etwas Ähnliches wie dieses XML in Spring Boot mit Java Config definieren.

<http pattern="/webservices/**" security="none"/>

Ich benötige eine andere Art der Sicherung und kann keine Formularanmeldungen durchführen. Die Sicherung erfolgt später. Ich möchte sie vorerst nicht mehr mit http.formLogin () sichern.

Ich habe WebSecurityConfigurerAdapter.configure () als solches überschrieben. Ich kann keine API finden, die Folgendes sagt:

http.securityNone().antMatchers("/webservices")

Hier ist meine configure () Methode:

@Override
protected void configure(HttpSecurity http) throws Exception
    http.csrf().disable(); 
    http.headers().frameOptions().disable();

    http.authorizeRequests()
          .antMatchers("/resources/**", 
//"/services/**",  THIS LOGS IN AUTOMATICALLY AS 'ANONYMOUS'.  NO GOOD!
//"/remoting/**",  THIS LOGS IN AUTOMATICALLY AS 'ANONYMOUS'.  NO GOOD!
                      "/pages/login",
                      "/pages/loginFailed").permitAll()

    // Only authenticated can access these URLs and HTTP METHODs
    .antMatchers("/secured/**").authenticated()
    .antMatchers(HttpMethod.HEAD,"/**").authenticated()
    .antMatchers(HttpMethod.GET,"/**").authenticated()
    .antMatchers(HttpMethod.POST,"/**").authenticated()
    .antMatchers(HttpMethod.PUT,"/**").authenticated()
    .antMatchers(HttpMethod.DELETE,"/**").authenticated();

    // Accept FORM-based authentication
    http.formLogin()
        .failureUrl("/pages/loginFailed")
        .defaultSuccessUrl("/")
        .loginPage("/pages/login")
        .permitAll()
        .and()
        .logout()
        .logoutRequestMatcher(new AntPathRequestMatcher("/pages/logout"))
        .logoutSuccessUrl("/pages/login")
        .permitAll();

    http.formLogin().successHandler(new AppLoginSuccessHandler());

}