(improvement)(project) Remove additional logging dependencies and use logback as the primary logging framework. (#1235)

This commit is contained in:
lexluo09
2024-06-27 09:39:26 +08:00
committed by GitHub
parent 24674fe0be
commit 7c711f6105
35 changed files with 210 additions and 221 deletions

View File

@@ -8,11 +8,11 @@ import com.tencent.supersonic.common.util.S2ThreadContext;
import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.connector.RequestFacade;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Strings;
import org.apache.tomcat.util.http.MimeHeaders;
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.util.Arrays;
@@ -33,7 +33,7 @@ public abstract class AuthenticationInterceptor implements HandlerInterceptor {
protected boolean isExcludedUri(String uri) {
String excludePathStr = authenticationConfig.getExcludePath();
if (Strings.isEmpty(excludePathStr)) {
if (StringUtils.isEmpty(excludePathStr)) {
return false;
}
List<String> excludePaths = Arrays.asList(excludePathStr.split(","));
@@ -45,7 +45,7 @@ public abstract class AuthenticationInterceptor implements HandlerInterceptor {
protected boolean isIncludedUri(String uri) {
String includePathStr = authenticationConfig.getIncludePath();
if (Strings.isEmpty(includePathStr)) {
if (StringUtils.isEmpty(includePathStr)) {
return false;
}
List<String> includePaths = Arrays.asList(includePathStr.split(","));

View File

@@ -9,7 +9,6 @@ import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
import javax.crypto.spec.SecretKeySpec;
@@ -128,7 +127,6 @@ public class UserTokenUtils {
return claims;
}
@NotNull
private static String getTokenString(String token) {
return token.startsWith(TOKEN_PREFIX) ? token.substring(token.indexOf(TOKEN_PREFIX)
+ TOKEN_PREFIX.length()).trim() : token.trim();