mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
代码优化,更新 FeignRequestInterceptor 对 null 的检测,直接使用 != null 代替 StringUtils.isNotNull,以免产生歧义
Signed-off-by: hjk2008 <hjk2008ext@163.com>
This commit is contained in:
@@ -22,7 +22,7 @@ public class FeignRequestInterceptor implements RequestInterceptor
|
|||||||
public void apply(RequestTemplate requestTemplate)
|
public void apply(RequestTemplate requestTemplate)
|
||||||
{
|
{
|
||||||
HttpServletRequest httpServletRequest = ServletUtils.getRequest();
|
HttpServletRequest httpServletRequest = ServletUtils.getRequest();
|
||||||
if (StringUtils.isNotNull(httpServletRequest))
|
if (httpServletRequest != null)
|
||||||
{
|
{
|
||||||
Map<String, String> headers = ServletUtils.getHeaders(httpServletRequest);
|
Map<String, String> headers = ServletUtils.getHeaders(httpServletRequest);
|
||||||
// 传递用户信息请求头,防止丢失
|
// 传递用户信息请求头,防止丢失
|
||||||
|
|||||||
Reference in New Issue
Block a user