-
Dec 22nd, 2010, 05:55 PM
#1
Oauth autowire ClientAuthenticationCache
Hey guys
In the Sparklr2 demo there is an autowired bean called ClientAuthenticationCache, now excuse my stupidity(and lack of indepth autowiring understanding), but I can't see where this bean comes from and when I try and implement similar in my own app, it complains cause the bean isn't initialised and autowiring fails..
Any suggestions to a spring newbie? 
thanks
Tom
-
Dec 23rd, 2010, 09:48 PM
#2
Hi.
The sparklr2 app actually doesn't have autowiring enabled, so the default instance is actually getting used. I presume that in your app, the autowiring is enabled and you either need to declare an instance of that interface in your application context or just remove the @Autowired annotation.
-
Dec 24th, 2010, 01:30 AM
#3
Ah right, interesting. Thanks.
Tom
-
Dec 24th, 2010, 11:59 AM
#4
A similar problem happens for me because OAuth2AuthorizationSuccessHandler has
@Autowired
public void setSerializationService(OAuth2SerializationService serializationService) {
this.serializationService = serializationService;
}
yet it also initializes it by default:
private OAuth2SerializationService serializationService = new DefaultOAuth2SerializationService();
this seems like a bug?, that either setSerializationService should have
@Autowired(required=false)
or OAuth2ProviderBeanDefinitionParser should provide a definition of that bean by default.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules