qq登录成功后获取用户信息异常

来源:5-9 单机Session管理

慕哥2328352

2019-07-04

qq登录成功后,能够访问index.html等资源,但是访问/user/me报错:
Could not write JSON: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.springframework.security.oauth2.provider.OAuth2Authentication[“userAuthentication”]->org.springframework.social.security.SocialAuthenticationToken[“connection”]->org.springframework.social.connect.support.OAuth2Connection[“displayName”])
调试过,displayName里面是有值的,在QQAdapter中设置成qq的nickname字段,调试的时候都是有值的,请问老师这个是什么问题。

写回答

1回答

JoJo

2019-07-08

是不是没写get/set方法?

0
1
慕哥2328352
老师,nickname是有getter和setter的,就是报这个错,怎么获取displayName都是null
2019-07-15
共1条回复

Spring Security技术栈开发企业级认证与授权

Spring Security技术栈,REST风格开发常见接口,独立开发认证授权模块保证REST服务安全

2662 学习 · 1561 问题

查看课程