Whenever I run my application I am shown an error " Can't configure antMatchers after anyRequest"

Even though My configure method looks like @Override protected void configure(HttpSecurity http) throws Exception { super.configure(http); http.cors().and().authorizeRequests().antMatchers("/hello").permitAll(); http.csrf().disable(); }

My Config Class is extending WebSecurityConfigurerAdapter and implements WebMvcConfigurer

Comment From: eleftherias

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements. You may notice that this question has already been asked on Stack Overflow here.