Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
89b16f81
Commit
89b16f81
authored
Jun 28, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
25bb1b7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
HeaderConfig.java
...m/github/wxiaoqi/security/api/vo/config/HeaderConfig.java
+3
-0
No files found.
ace-modules/ace-interface/src/main/java/com/github/wxiaoqi/security/api/vo/config/HeaderConfig.java
View file @
89b16f81
...
...
@@ -2,6 +2,7 @@ package com.github.wxiaoqi.security.api.vo.config;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestAttributes
;
...
...
@@ -17,6 +18,7 @@ import java.util.Enumeration;
* @description 设置请求头部信息,防止微服务之间调用请求头部信息丢失
* @data 2019/6/25 16:22
*/
@Slf4j
public
class
HeaderConfig
implements
RequestInterceptor
{
@Override
...
...
@@ -31,6 +33,7 @@ public class HeaderConfig implements RequestInterceptor {
while
(
headerNames
.
hasMoreElements
()){
String
headerName
=
headerNames
.
nextElement
();
String
headerValue
=
request
.
getHeader
(
headerName
);
log
.
info
(
"----headerName===="
+
headerName
+
"----headerValue===="
+
headerValue
);
template
.
header
(
headerName
,
headerValue
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment