title: How to config spring security to use my customized UserDetailsManager?
body: <p>I'm using spring security to manage user log in/signup in my project. I need to implement user lockout functionality after three failed log in attempts.What I did is to add another field 'account_non_locked' in 'Users' table in database.</p>
  
  <p>The problem I'm facing is that spring security does not update that newly added column. I digged into the source code and found in the default UserDetailsManager the sql statement is written as:</p>
  
  <pre><code>"insert into users (username, password, enabled) values (?,?,?)"
  </code></pre>
  
  <p>which explains why it does not recognized my new column.</p>
  
  <p>So I copy that file and change it to fit my own need, which is CustomUserDetailsManager.java</p>
  
  <p>Now I can't configure spring security to use my own customized UserDetailsManager. The configuration file right now is:</p>
  
  <pre><code>&lt;authentication-manager alias="authenticationManager"&gt;
    &lt;authentication-provider&gt;
      &lt;password-encoder ref="passwordEncoder" /&gt;
      &lt;jdbc-user-service id="userDetailsService" data-source-ref="dataSource" /&gt;
    &lt;/authentication-provider&gt;
  &lt;/authentication-manager&gt;
  &lt;beans:bean id="passwordEncoder" class="org.springframework.security.crypto.password.StandardPasswordEncoder" /&gt;
  </code></pre>
  
  <p>I can't find any examples online that will configure this properly. Please help and thanks in advance!</p>