Czemu Spring zwraca kod 401 przy próbie POST do /register?
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.anyRequest().authenticated()
.antMatchers("/register").permitAll()
.and().httpBasic()
.and().csrf().disable();
}