diff --git a/pqs-common/common-core/pom.xml b/pqs-common/common-core/pom.xml index 2ad0cc9c1..8411d6dcc 100644 --- a/pqs-common/common-core/pom.xml +++ b/pqs-common/common-core/pom.xml @@ -29,6 +29,12 @@ org.springframework.boot spring-boot-starter-json + + + org.apache.logging.log4j + log4j-to-slf4j + + diff --git a/pqs-common/common-oss/pom.xml b/pqs-common/common-oss/pom.xml index 64bb047e2..7ccd85af5 100644 --- a/pqs-common/common-oss/pom.xml +++ b/pqs-common/common-oss/pom.xml @@ -25,6 +25,16 @@ com.njcn huawei-obs-springboot-starter 1.0.0 + + + org.apache.logging.log4j + log4j-core + + + org.apache.logging.log4j + log4j-api + + diff --git a/pqs-common/common-web/pom.xml b/pqs-common/common-web/pom.xml index c6319f124..429062075 100644 --- a/pqs-common/common-web/pom.xml +++ b/pqs-common/common-web/pom.xml @@ -36,12 +36,12 @@ org.springframework.boot spring-boot-starter-web - - - - - - + + + org.apache.logging.log4j + log4j-to-slf4j + + @@ -52,6 +52,10 @@ org.slf4j slf4j-simple + + org.slf4j + slf4j-simple + diff --git a/pqs-common/common-web/src/main/java/com/njcn/web/utils/RequestUtil.java b/pqs-common/common-web/src/main/java/com/njcn/web/utils/RequestUtil.java index 14144a104..cb811298f 100644 --- a/pqs-common/common-web/src/main/java/com/njcn/web/utils/RequestUtil.java +++ b/pqs-common/common-web/src/main/java/com/njcn/web/utils/RequestUtil.java @@ -1,6 +1,7 @@ package com.njcn.web.utils; +import cn.hutool.core.text.StrPool; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.nimbusds.jose.JWSObject; @@ -13,7 +14,6 @@ import lombok.extern.slf4j.Slf4j; import net.sf.json.JSONObject; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.util.Strings; import org.springframework.http.HttpHeaders; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServletServerHttpRequest; @@ -52,7 +52,7 @@ public class RequestUtil { // 从请求头获取 * 获取登录认证的客户端ID String basic = request.getHeader(SecurityConstants.AUTHORIZATION_KEY); if (StrUtil.isNotBlank(basic) && basic.startsWith(SecurityConstants.BASIC_PREFIX)) { - basic = basic.replace(SecurityConstants.BASIC_PREFIX, Strings.EMPTY); + basic = basic.replace(SecurityConstants.BASIC_PREFIX, ""); String basicPlainText = new String(Base64.getDecoder().decode(basic.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8); clientId = basicPlainText.split(":")[0]; //client:secret }