I have been following the Spring Security Reference and i added only this classes:
@Configuration @EnableWebMvcSecurity public class WebSecurityConfig extend
I had the same problem. I fixed it deleting http.antMatchers("").The problem was "" - SpringSecurityFilterChain throws an error, because pattern could not be empty or null.
http.antMatchers("")