代码优化,更新 FeignRequestInterceptor 对 null 的检测,直接使用 `!= null` 代替 `StringUtils.isNotNull`,以免产生歧义

Signed-off-by: hjk2008 <hjk2008ext@163.com>
This commit is contained in:
hjk2008 2022-12-04 08:35:52 +00:00 committed by Gitee
parent 3d2f9aa9c6
commit 477b7472be
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ public class FeignRequestInterceptor implements RequestInterceptor
public void apply(RequestTemplate requestTemplate)
{
HttpServletRequest httpServletRequest = ServletUtils.getRequest();
if (StringUtils.isNotNull(httpServletRequest))
if (httpServletRequest != null)
{
Map<String, String> headers = ServletUtils.getHeaders(httpServletRequest);
// 传递用户信息请求头防止丢失