Migrate Spring Security configuration for Spring Security 6

I have this Spring Security code which I want to configure for Spring Security 6:

public void configure(final HttpSecurity http) throws Exception {

    http.authorizeRequests()
        .antMatchers(permittedAntMatchers())
        .permitAll();

    http.authorizeRequests().antMatchers("/**").authenticated();

    .....

    http.exceptionHandling()....;
  }

I get error for Cannot resolve method 'antMatchers' in 'ExpressionInterceptUrlRegistry'. Do you know how I can migrate this project properly?



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)