diff --git a/zlt-commons/zlt-ribbon-spring-boot-starter/src/main/java/com/central/common/ribbon/config/FeignInterceptorConfig.java b/zlt-commons/zlt-ribbon-spring-boot-starter/src/main/java/com/central/common/ribbon/config/FeignInterceptorConfig.java index da49e1e8..cc8f3503 100644 --- a/zlt-commons/zlt-ribbon-spring-boot-starter/src/main/java/com/central/common/ribbon/config/FeignInterceptorConfig.java +++ b/zlt-commons/zlt-ribbon-spring-boot-starter/src/main/java/com/central/common/ribbon/config/FeignInterceptorConfig.java @@ -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)) {