From 98e85429e828989b2854c77625695fa4140683e2 Mon Sep 17 00:00:00 2001 From: "Dylan.Liu" Date: Wed, 15 Dec 2021 14:17:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?KERNEL-9862=20fix:=20druid=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5slf4j?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third/alibaba/druid/filter/logging/Slf4jLogFilter.java | 4 ++-- .../fr/third/alibaba/druid/support/logging/LogFactory.java | 4 ++-- .../fr/third/alibaba/druid/support/logging/SLF4JImpl.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/filter/logging/Slf4jLogFilter.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/filter/logging/Slf4jLogFilter.java index 359adc6be..9eab4f3d5 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/filter/logging/Slf4jLogFilter.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/filter/logging/Slf4jLogFilter.java @@ -15,8 +15,8 @@ */ package com.fr.third.alibaba.druid.filter.logging; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import com.fr.third.slf4j.Logger; +import com.fr.third.slf4j.LoggerFactory; public class Slf4jLogFilter extends LogFilter { diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java index fa831f17e..1bc9592e2 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java @@ -26,7 +26,7 @@ public class LogFactory { String logType= System.getProperty("druid.logType"); if(logType != null){ if(logType.equalsIgnoreCase("slf4j")){ - tryImplementation("org.slf4j.Logger", "SLF4JImpl"); + tryImplementation("com.fr.third.slf4j.Logger", "SLF4JImpl"); }else if(logType.equalsIgnoreCase("log4j")){ tryImplementation("org.apache.log4j.Logger", "Log4jImpl"); }else if(logType.equalsIgnoreCase("log4j2")){ @@ -38,13 +38,13 @@ public class LogFactory { tryImplementation("java.util.logging.Logger", "Jdk14LoggingImpl"); } } + tryImplementation("com.fr.third.slf4j.Logger", "SLF4JImpl"); // 优先选择log4j2防止漏洞 tryImplementation("com.fr.third.apache.logging.log4j.Logger", "FRLog4j2Impl"); // 优先选择log4j,而非Apache Common Logging. 因为后者无法设置真实Log调用者的信息 tryImplementation("com.fr.third.apache.log4j.Logger", "FRLog4jImpl"); tryImplementation("org.apache.log4j.Logger", "Log4jImpl"); tryImplementation("org.apache.logging.log4j.Logger", "Log4j2Impl"); - tryImplementation("org.slf4j.Logger", "SLF4JImpl"); tryImplementation("org.apache.commons.logging.LogFactory", "JakartaCommonsLoggingImpl"); tryImplementation("java.util.logging.Logger", "Jdk14LoggingImpl"); diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/SLF4JImpl.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/SLF4JImpl.java index 427c505b9..1e5c5ff91 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/SLF4JImpl.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/SLF4JImpl.java @@ -15,9 +15,9 @@ */ package com.fr.third.alibaba.druid.support.logging; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.slf4j.spi.LocationAwareLogger; +import com.fr.third.slf4j.Logger; +import com.fr.third.slf4j.LoggerFactory; +import com.fr.third.slf4j.spi.LocationAwareLogger; public class SLF4JImpl implements Log { From cf491d539bd5fa6e095a0da04b7fb99f011244b0 Mon Sep 17 00:00:00 2001 From: "Dylan.Liu" Date: Wed, 15 Dec 2021 15:25:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?KERNEL-9861=20fix:=20pom=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fine-druid/pom.xml | 188 ++++++++++++++++----------------------------- 1 file changed, 65 insertions(+), 123 deletions(-) diff --git a/fine-druid/pom.xml b/fine-druid/pom.xml index 750a06e1a..5d69c0f33 100644 --- a/fine-druid/pom.xml +++ b/fine-druid/pom.xml @@ -15,6 +15,11 @@ ${revision} + + com.fr.essential + fine-slf4j-api + ${essentialVersion} + com.fr.third fine-spring @@ -30,7 +35,7 @@ fine-javax-annotation ${revision} - 以下是lib的本地jar包依赖<--> + com.fr.third accessors-smart @@ -89,14 +94,14 @@ com.fr.third - jetty-::-apache-jsp-implementation + jetty-apache-jsp-implementation local system ${basedir}/lib/apache-jsp-9.3.20.v20170531.jar com.fr.third - apache-::-jstl-module + apache-jstl-module local system ${basedir}/lib/apache-jstl-9.3.20.v20170531.jar @@ -215,7 +220,7 @@ com.fr.third - bonecp-::-core-library + bonecp-core-library local system ${basedir}/lib/bonecp-0.8.0.RELEASE.jar @@ -586,7 +591,7 @@ com.fr.third - guava:-google-core-libraries-for-java + guava-google-core-libraries-for-java local system ${basedir}/lib/guava-30.1-jre.jar @@ -1132,7 +1137,7 @@ com.fr.third - jax-rs-provider-for-json-content-type,-using-jackson-data-binding + jax-rs-provider-for-json-content-type-using-jackson-data-binding local system ${basedir}/lib/jackson-jaxrs-1.8.3.jar @@ -1214,69 +1219,6 @@ system ${basedir}/lib/java-xmlbuilder-0.4.jar - - com.fr.third - javax.annotation-api - local - system - ${basedir}/lib/javax.annotation-api-1.2.jar - - - com.fr.third - expression-language-3.0 - local - system - ${basedir}/lib/javax.el-3.0.1-b12.jar - - - com.fr.third - javax.inject - local - system - ${basedir}/lib/javax.inject-1.jar - - - com.fr.third - javax.inject:1-as-osgi-bundle - local - system - ${basedir}/lib/javax.inject-2.5.0-b32.jar - - - com.fr.third - jdo-api - local - system - ${basedir}/lib/javax.jdo-3.2.0-m3.jar - - - com.fr.third - java-servlet-api - local - system - ${basedir}/lib/javax.servlet-api-3.1.0.jar - - - com.fr.third - jsp-implementation - local - system - ${basedir}/lib/javax.servlet.jsp-2.3.2.jar - - - com.fr.third - javaserver-pages(tm)-api - local - system - ${basedir}/lib/javax.servlet.jsp-api-2.3.1.jar - - - com.fr.third - javax.ws.rs-api - local - system - ${basedir}/lib/javax.ws.rs-api-2.0.1.jar - com.fr.third javolution @@ -1298,13 +1240,13 @@ system ${basedir}/lib/jaxb-impl-2.2.3-1.jar - - com.fr.third - jcl-over-slf4j - local - system - ${basedir}/lib/jcl-over-slf4j-1.7.21.jar - + + + + + + + com.fr.third jcodings @@ -1426,63 +1368,63 @@ com.fr.third - jetty-::-servlet-annotations + jetty-servlet-annotations local system ${basedir}/lib/jetty-annotations-9.3.20.v20170531.jar com.fr.third - jetty-::-asynchronous-http-client + jetty-asynchronous-http-client local system ${basedir}/lib/jetty-client-9.3.20.v20170531.jar com.fr.third - jetty-::-http-utility + jetty-http-utility local system ${basedir}/lib/jetty-http-9.3.20.v20170531.jar com.fr.third - jetty-::-io-utility + jetty-io-utility local system ${basedir}/lib/jetty-io-9.3.20.v20170531.jar com.fr.third - jetty-::-jaas + jetty-jaas local system ${basedir}/lib/jetty-jaas-9.3.20.v20170531.jar com.fr.third - jetty-::-jndi-naming + jetty-jndi-naming local system ${basedir}/lib/jetty-jndi-9.3.20.v20170531.jar com.fr.third - jetty-::-plus + jetty-plus local system ${basedir}/lib/jetty-plus-9.3.20.v20170531.jar com.fr.third - jetty-::-rewrite-handler + jetty-rewrite-handler local system ${basedir}/lib/jetty-rewrite-9.3.20.v20170531.jar com.fr.third - jetty-::-runner + jetty-runner local system ${basedir}/lib/jetty-runner-9.3.20.v20170531.jar @@ -1496,21 +1438,21 @@ com.fr.third - jetty-::-security + jetty-security local system ${basedir}/lib/jetty-security-9.3.20.v20170531.jar com.fr.third - jetty-::-server-core + jetty-server-core local system ${basedir}/lib/jetty-server-9.3.20.v20170531.jar com.fr.third - jetty-::-servlet-handling + jetty-servlet-handling local system ${basedir}/lib/jetty-servlet-9.3.20.v20170531.jar @@ -1524,28 +1466,28 @@ com.fr.third - jetty-::-utilities + jetty-utilities local system ${basedir}/lib/jetty-util-9.3.20.v20170531.jar com.fr.third - jetty-::-utilities-::-ajax(json) + jetty-utilities-ajax-json local system ${basedir}/lib/jetty-util-ajax-9.3.19.v20170502.jar com.fr.third - jetty-::-webapp-application-support + jetty-webapp-application-support local system ${basedir}/lib/jetty-webapp-9.3.20.v20170531.jar com.fr.third - jetty-::-xml-utilities + jetty-xml-utilities local system ${basedir}/lib/jetty-xml-9.3.20.v20170531.jar @@ -1711,13 +1653,13 @@ system ${basedir}/lib/log4j-core-2.13.2.jar - - com.fr.third - apache-log4j-slf4j-binding - local - system - ${basedir}/lib/log4j-slf4j-impl-2.10.0.jar - + + + + + + + com.fr.third apache-log4j-web @@ -1790,7 +1732,7 @@ com.fr.third - oracle-corporation's-jdbc-and-xdevapi-driver-for-mysql + oracle-corporations-jdbc-and-xdevapi-driver-for-mysql local system ${basedir}/lib/mysql-connector-java-8.0.21.jar @@ -1811,14 +1753,14 @@ com.fr.third - netty/buffer + netty-buffer local system ${basedir}/lib/netty-buffer-4.1.17.Final.jar com.fr.third - netty/common + netty-common local system ${basedir}/lib/netty-common-4.1.17.Final.jar @@ -1909,7 +1851,7 @@ com.fr.third - osgi-resource-locator-bundle---used-by-various-api-providers-that-rely-on-meta-inf/services-mechanism-to-locate-providers. + osgi-resource-locator-bundle--used-by-various-api-providers-that-rely-on-meta-inf-services-mechanism-to-locate-providers local system ${basedir}/lib/osgi-resource-locator-1.0.1.jar @@ -1937,7 +1879,7 @@ com.fr.third - protocol-buffers-[core] + protocol-buffers-core local system ${basedir}/lib/protobuf-java-3.11.4.jar @@ -1977,20 +1919,20 @@ system ${basedir}/lib/sketches-core-0.9.0.jar - - com.fr.third - slf4j-api - local - system - ${basedir}/lib/slf4j-api-1.7.9.jar - - - com.fr.third - slf4j-log4j12 - local - system - ${basedir}/lib/slf4j-log4j12-1.7.9.jar - + + + + + + + + + + + + + + com.fr.third snakeyaml @@ -2217,35 +2159,35 @@ com.fr.third - jetty-::-websocket-::-api + jetty-websocket-api local system ${basedir}/lib/websocket-api-9.3.20.v20170531.jar com.fr.third - jetty-::-websocket-::-client + jetty-websocket-client local system ${basedir}/lib/websocket-client-9.3.20.v20170531.jar com.fr.third - jetty-::-websocket-::-common + jetty-websocket-common local system ${basedir}/lib/websocket-common-9.3.20.v20170531.jar com.fr.third - jetty-::-websocket-::-server + jetty-websocket-server local system ${basedir}/lib/websocket-server-9.3.20.v20170531.jar com.fr.third - jetty-::-websocket-::-servlet-interface + jetty-websocket-servlet-interface local system ${basedir}/lib/websocket-servlet-9.3.20.v20170531.jar From 7c4692dcefe9a6cc6fe2cbd6b1ca2568b881bc4d Mon Sep 17 00:00:00 2001 From: "Dylan.Liu" Date: Wed, 15 Dec 2021 16:58:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?KERNEL-9685=20fix:=20log4j=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fine-jboss-logging/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fine-jboss-logging/pom.xml b/fine-jboss-logging/pom.xml index a39e85448..702197f28 100644 --- a/fine-jboss-logging/pom.xml +++ b/fine-jboss-logging/pom.xml @@ -17,7 +17,7 @@ com.fr.essential - fine-log4j + fine-log4j2 ${essentialVersion} 以下是lib的本地jar包依赖<-->