title: Why do I get a 404 after I login to springs default login page?
body: <p>I am getting a 404 after I loggin in a very simple Spring Boot Application. It happen's since I added the password encoder stuff into my configureAuth method. Can someone help me?</p>
  
  <p>Here ist my security configuration code:</p>
  
  <pre><code>@Configuration
  @EnableGlobalAuthentication
  public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
  
  @Autowired
  private DataSource dataSource;
  
  @Autowired
  public void configureAuth(final AuthenticationManagerBuilder auth) throws Exception {
      auth.jdbcAuthentication().passwordEncoder(passwordEncoder()).dataSource(dataSource).withDefaultSchema()
              .withUser("admin").password(passwordEncoder().encode("admin123")).roles("USER", "ADMIN");
  }
  
  @Override
  protected void configure(HttpSecurity http) throws Exception {
      http.authorizeRequests().anyRequest().authenticated().and().formLogin().and().httpBasic().and().csrf().disable()
              .headers().frameOptions().disable();
  }
  
  @Bean
  public BCryptPasswordEncoder passwordEncoder() {
      return new BCryptPasswordEncoder();
  }
  }
  </code></pre>
  
  <p>There is no exception or other error. A simple whitelabel error page with 404 is showing up.</p>
  
  <p>EDIT: The login form is coming up, but I think there is something wrong with the authentication.</p>
  
  <p>Thank you,
  Christian</p>