0

我是 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;
}
4

1 回答 1

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" />

这是为了任何人的帮助。谢谢!

于 2012-10-29T16:42:46.273 回答