@Bean
 public DefaultTokenServices tokenServices() {
   DefaultTokenServices tokenServices = new DefaultTokenServices();
   tokenServices.setTokenStore(tokenStore());
   tokenServices.setClientDetailsService(clientDetailsService());
   return tokenServices;
 }
 @Bean
 public DefaultTokenServices tokenServices() {
   DefaultTokenServices services = new DefaultTokenServices();
   services.setClientDetailsService(clientDetailsService);
   services.setSupportRefreshToken(true);
   services.setTokenStore(new InMemoryTokenStore());
   return services;
 }
 @Bean
 public DefaultTokenServices tokenServices(
     InMemoryTokenStore tokenStore, ClientDetailsService jpaUserCredentialsService) {
   DefaultTokenServices defaultTokenServices = new DefaultTokenServices();
   defaultTokenServices.setTokenStore(tokenStore);
   defaultTokenServices.setSupportRefreshToken(true);
   defaultTokenServices.setClientDetailsService(jpaUserCredentialsService);
   return defaultTokenServices;
 }