我是Java Config&我正在努力将一个基于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;
}
答案 0 :(得分: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" />
这是为了任何人的帮助。谢谢!