We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我下载源码 然后dubug 还是qubudao取不到值 .qq注册之后 就无法获取token 一直报错 我下载的分支 5-6 和5-7 都有这样的问题...还请大神解惑..不然下面的视频看不下去.
The text was updated successfully, but these errors were encountered:
把写在SocialConfig类中的getUsersConnectionRepository方法放置到QQAuthConfig中即可。( @OverRide)
Sorry, something went wrong.
查看org.springframework.social.config.annotation.SocialConfiguration.usersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) 源码就知道原因了, for (SocialConfigurer socialConfigurer : socialConfigurers) { UsersConnectionRepository ucrCandidate = socialConfigurer.getUsersConnectionRepository(connectionFactoryLocator); if (ucrCandidate != null) { usersConnectionRepository = ucrCandidate; break; } } 它只要第一个SocialConfigurer的实现类中获取到的UsersConnectionRepository不为空就直接break了,然后,我们SocialConfig类继承的SocialConfigurerAdapter类默认实现了getUsersConnectionRepository()方法,返回的是InMemoryUsersConnectionRepository对象。所以我们需要让SocialConfig类在SocialConfigurer的所有实现类中第一个被创建,我的方法是添加@Order注册即可
org.springframework.social.config.annotation.SocialConfiguration.usersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator)
for (SocialConfigurer socialConfigurer : socialConfigurers) { UsersConnectionRepository ucrCandidate = socialConfigurer.getUsersConnectionRepository(connectionFactoryLocator); if (ucrCandidate != null) { usersConnectionRepository = ucrCandidate; break; } }
SocialConfigurer
UsersConnectionRepository
SocialConfig
SocialConfigurerAdapter
getUsersConnectionRepository()
InMemoryUsersConnectionRepository
@Order
No branches or pull requests
我下载源码 然后dubug 还是qubudao取不到值 .qq注册之后 就无法获取token 一直报错
我下载的分支 5-6 和5-7 都有这样的问题...还请大神解惑..不然下面的视频看不下去.
The text was updated successfully, but these errors were encountered: