Spring remember me service not populating persistent_logins table
<p>I am trying to implement login example with remember me service using spring security using example from <a href="http://websystique.com/spring-security/spring-security-4-remember-me-example-with-hibernate/" rel="nofollow">here</a>. I have implemented security configuration class same as in the example. Code below:</p>

<pre><code>@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter{

    @Autowired
    @Qualifier("customUserDetailsService")
    UserDetailsService userDetailsService;

    @Autowired
    DataSource dataSource;

    @Autowired
    public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userDetailsService);
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests().antMatchers("/").permitAll()
        .antMatchers("/admin/**").access("hasRole('ADMIN')")
        .antMatchers("/user/**").access("hasRole('USER')")
        .and().formLogin().loginPage("/login").usernameParameter("username")
        .defaultSuccessUrl("/welcome").passwordParameter("password")
        .and().rememberMe().rememberMeParameter("rememberme")
        .tokenRepository(persistantTokenRepository()).tokenValiditySeconds(99999);
    }

    @Bean
    public PersistentTokenRepository persistantTokenRepository() {
        JdbcTokenRepositoryImpl repositoryImpl = new JdbcTokenRepositoryImpl();
        System.out.println(dataSource.toString()+"HERE");
        repositoryImpl.setDataSource(dataSource);
        return repositoryImpl;
    }
}
</code></pre>

<p>Everything works fine. I am able to login and i can check that remember-me cookie is present in the browser. The application keeps me login after closing and opening the browser too. However, I am not able to get any entries in persistent_logins table in my database. </p>

<p>Can anybody help me why persistent_logins table is not getting populated  and how the application is able to keep me login without even consulting persistent_logins table?</p>