Comments (2)
把写在SocialConfig类中的getUsersConnectionRepository方法放置到QQAuthConfig中即可。( @OverRide)
from security.
查看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
注册即可
from security.
Related Issues (18)
- imooc-security-authorize这个模块怎么运行 HOT 2
- 在代码中配置了JdbcUsersConnectionRepository但是实际没有生效 HOT 5
- 第5章看到QQ登录时候 一直获取不到userId HOT 5
- master的 test项目下pom.xml文件 中文格式不对
- authorize HOT 2
- 能否提供`imooc-security-authorize`模块那五张表的建表语句sql HOT 2
- 请问示例的qq.app-id和qq.app-secret是什么 HOT 3
- AuthenticationManager无法注入,是要自己实现么 HOT 3
- APP的鉴权模式下 如何展示swagger-ui
- app模块为什么还要form表单登录的配置呢 HOT 2
- 关于6-7重构社交登陆 HOT 1
- 能否讲解一下 普通请求的过滤流程 (非登陆请求) HOT 2
- qq登陆MyUserDetailsService 配置不起作用 HOT 7
- bug提交 springsocial1.1.6.RELEASE 不兼容 mysql 8 HOT 4
- qq绑定,解绑问题 HOT 1
- The clientId property cannot be null
- 有没有qq可用的appid啊
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from security.