I was using Spring boot 1.x with the below security config.
http.authorizeRequests() .antMatchers("/css/**", "/build/**","