我使用了social:jdbc-connection-repository来配置SocialAuthenticationFilter,但是它似乎没有被Spring识别,因为它抱怨userConnectionRepository尚未定义。我正在使用maven 1.1.0.M4
<bean id="socialAuthenticationFilter" class="org.springframework.social.security.SocialAuthenticationFilter">
<constructor-arg index="0" ref="authenticationManager"/>
<constructor-arg index="1" ref="userIdSource"/>
<constructor-arg index="2" ref="userConnectionRepository"/>
<constructor-arg index="3" ref="connectionFactoryLocator"/>
<property name="signupUrl" value="/user/register"/>
</bean>
此外,我是否可以在不使用social:jdbc-connection-repository的情况下知道如何在XML中定义userConnectionRepository和connectionFactoryLocator?
答案 0 :(得分:0)
我会推荐以下代码:
@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public UsersConnectionRepository usersConnectionRepository(){
return new JdbcUsersConnectionRepository(datasource, connectionFactoryLocator(),textEncryptor);
}