In my config class I define my Interceptor in the usual way:
where my interceptor is defined this way:
And everything works as expected.
What I find strange is that if the interceptor class is defined using generics in this way:
and instantiated with Facebook this way:
then the interceptor methods are not called.
Is that normal, and if yes, why? I could not get it :(
Code:
@Bean
public ProviderSignInController providerSignInController(RequestCache requestCache) {
ProviderSignInController signInController = new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository,
new MySignInAdapter(requestCache, userRepository, userAliasRepository));
signInController.addSignInInterceptor(new MyProviderSignInInterceptor());
return signInController;
}
Code:
public class MyProviderSignInInterceptor implements ProviderSignInInterceptor<Facebook> { .. }
What I find strange is that if the interceptor class is defined using generics in this way:
Code:
public class MyProviderSignInInterceptor<T> implements ProviderSignInInterceptor<T> { .. }
Code:
@Bean
public ProviderSignInController providerSignInController(RequestCache requestCache) {
ProviderSignInController signInController = new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository,
new MySignInAdapter(requestCache, userRepository, userAliasRepository));
signInController.addSignInInterceptor(new MyProviderSignInInterceptor<Facebook>());
return signInController;
}
Is that normal, and if yes, why? I could not get it :(