2012-10-29 98 views
0

我是新來的Java配置& am stuggling轉換一塊基於Java的配置爲基於XML的配置。 任何人都可以引導我轉換。非常感謝!Java配置到XML配置 - 春季社交

@Bean 
@Scope(value="singleton", proxyMode=ScopedProxyMode.INTERFACES) 
public UsersConnectionRepository usersConnectionRepository(AccountRepository accountRepository) { 
    JdbcUsersConnectionRepository repository = new JdbcUsersConnectionRepository(
     dataSource, connectionFactoryLocator(), Encryptors.noOpText()); 
    repository.setConnectionSignUp(new AccountConnectionSignUp(accountRepository)); 
    return repository; 
} 

回答

1

好了,發現了自己:

<bean id="usersConnectionRepository" 
     class="org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository"> 
     <constructor-arg ref="jpaDataSource" /> 
     <constructor-arg ref="connectionFactoryLocator" /> 
     <constructor-arg ref="textEncryptor" /> 
     <property name="connectionSignUp" ref="accountConnectionSignUp" /> 
    </bean> 

    <bean id="accountConnectionSignUp" class="path to AccountConnectionSignUp" /> 

這是任何人的幫助。謝謝!