title: Custom WebSecurityConfigurerAdapter
body: <p>I have this problem implementing a custom login authentication using SpringBoot and SpringBoot-Security. I made a <a href="https://bitbucket.org/dpebadiola/springbootcustomwebsecurity">Bitbucket repository</a> as reference for this thread (within <a href="https://bitbucket.org/dpebadiola/springbootcustomwebsecurity/branch/CustomSecuringWeb">CustomSecuringWeb branch</a>). Before anything else, most of the comments here follows the <a href="https://spring.io/guides/gs/securing-web/">Securing a Web Application</a> tutorial.</p>
  
  <p>The thing is, I was curious as how could the authentication data is now from the database instead of just memory data (which is very common in production line applications).</p>
  
  <p>Throughout the process I made two attempts (though both attempts are located on the same branch - <em>my bad for that</em>).</p>
  
  <ol>
  <li>Created a custom <code>UserDetailsService</code> implementation</li>
  <li>Created a custom <code>AbstractUserDetailsAuthentictionProvider</code> implementation</li>
  </ol>
  
  <p>I don't know where the problem lies, but upon checking the console log both returns that the persistence(even the repository) DI on each custom class where null.</p>
  
  <p>The question is how could I make both attempts working. And (possibly) which one of the two attempts is better than the other.</p>