想问下除了token之外是否还有其他的限制

提问 4 2397
笑容
笑容 VIP1 2018-07-02
版本:renren-fast 开发环境:
今天发现我 参数带着token过去,没有获取到user 在使用getUser.getUserName报空指针 想问下是不是只有token不够 还是有其他的机制导致我不能获取user 我用咱们这个带的前端框架刷新一下 之前那个接口就不报错了 [pre] curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'token: af93950330eca176ff0bc9058c60e569' -d '{ \ \ "xxxxx": "12", \ "xxxx": "string", \ "xxxx": "string", \ "xxxxx": "string", \ "xxxx": 60 \ }' 'http://localhost:8080/xxxx/xxxx/xxxx/save' [/pre] [pre] { "code": 500, "message": "未知异常,请联系管理员" } [/pre] [pre] 2018-07-02 01:38:41.969 ERROR 20468 --- [nio-8080-exec-3] c.f.common.exception.RRExceptionHandler : null java.lang.NullPointerException: null [/pre]
本帖标签: renren-fast
回帖
  • 请求的路径,不能配置成下面这样 [pre] filterMap.put("/xxx/**", "anon"); [/pre]
    0
  • 笑容
    笑容 VIP1 (楼主)
    2018-07-02
    @Mark 但是我是带着token过来的啊 也不能拿到user么 还是说只要这么配置了 即使有token 也不会拿到user
    0
  • @笑容 是的,不能这样配置
    0
  • 笑容
    笑容 VIP1 (楼主)
    2018-07-02
    @Mark 好 谢谢
    0
本帖已结贴