feign属性输出
This commit is contained in:
@ -40,7 +40,9 @@ public class FeignConfig implements RequestInterceptor {
|
||||
@Override
|
||||
public void apply(RequestTemplate template) {
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
|
||||
|
||||
log.info("--------白名单-"+tokenWhiteList);
|
||||
log.info("--------请求url-"+template.url());
|
||||
if (Objects.nonNull(attributes)) {
|
||||
if (isNonExistsWhiteList(template.url())) {
|
||||
injectToken(template, attributes);
|
||||
@ -76,6 +78,8 @@ public class FeignConfig implements RequestInterceptor {
|
||||
*/
|
||||
private void injectToken(RequestTemplate template, ServletRequestAttributes attributes) {
|
||||
final String header = attributes.getRequest().getHeader(AUTHORIZATION_HEADER);// 提取request头信息
|
||||
|
||||
log.info("--------请求header信息-"+header);
|
||||
// 移除已存的头信息
|
||||
template.removeHeader(AUTHORIZATION_HEADER);
|
||||
|
||||
|
Reference in New Issue
Block a user