Skip to content

Commit

Permalink
优化Feign拦截器,增加userid参数
Browse files Browse the repository at this point in the history
  • Loading branch information
zlt2000 committed Aug 12, 2019
1 parent c72aeaa commit 94563a8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public RequestInterceptor requestInterceptor() {
}
*/

//传递userid
String userid = request.getHeader(SecurityConstants.USER_ID_HEADER);
if (StrUtil.isNotEmpty(userid)) {
template.header(SecurityConstants.USER_ID_HEADER, userid);
}

//传递username
String username = request.getHeader(SecurityConstants.USER_HEADER);
if (StrUtil.isNotEmpty(username)) {
Expand Down

0 comments on commit 94563a8

Please sign in to comment.