jojozhai / security

586 stars 488 forks source link

第5章看到QQ登录时候 一直获取不到userId #4

Open xiaodaoM opened 6 years ago

xiaodaoM commented 6 years ago

image

希望大神就解决...

longfeizheng commented 6 years ago

把写在SocialConfig类中的getUsersConnectionRepository方法放置到QQAuthConfig中即可。

fzizhe commented 6 years ago

准确说把写在SocialConfig类中的getUsersConnectionRepository方法复制到QQAuthConfig中即可。

longfeizheng commented 6 years ago

QQAuthConfig中添加@Order注解https://github.com/longfeizheng/logback/blob/master/src/main/java/cn/merryyou/logback/social/qq/config/QQAuthConfig.java#L22

zhazhahui666 commented 6 years ago

@longfeizheng 方便解释下吗,确实能解决,但是我看2个都继承了SocialConfigurerAdapter,这个结果怎么就不一样呢

longfeizheng commented 6 years ago

@longfeizheng 方便解释下吗,确实能解决,但是我看2个都继承了SocialConfigurerAdapter,这个结果怎么就不一样呢 就是spring有默认的排序,加上@Order从而影响它默认的排序规则,具体可自己debug看下。