diff --git a/apache-fop/pom.xml b/apache-fop/pom.xml index 6075c23d21..635e5c6a0b 100644 --- a/apache-fop/pom.xml +++ b/apache-fop/pom.xml @@ -28,11 +28,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/core-java/pom.xml b/core-java/pom.xml index d2fa1cdd2e..44e7df722c 100644 --- a/core-java/pom.xml +++ b/core-java/pom.xml @@ -92,11 +92,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - org.projectlombok lombok diff --git a/core-java/src/test/java/org/baeldung/core/exceptions/FileNotFoundExceptionUnitTest.java b/core-java/src/test/java/org/baeldung/core/exceptions/FileNotFoundExceptionUnitTest.java index e615e6a7d1..e8007ad4c4 100644 --- a/core-java/src/test/java/org/baeldung/core/exceptions/FileNotFoundExceptionUnitTest.java +++ b/core-java/src/test/java/org/baeldung/core/exceptions/FileNotFoundExceptionUnitTest.java @@ -6,12 +6,14 @@ import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.junit.Test; public class FileNotFoundExceptionUnitTest { - private static final Logger LOG = Logger.getLogger(FileNotFoundExceptionUnitTest.class); + private static final Logger LOG = LoggerFactory.getLogger(FileNotFoundExceptionUnitTest.class); private String fileName = Double.toString(Math.random()); diff --git a/couchbase-sdk/pom.xml b/couchbase-sdk/pom.xml index 1200fab454..c8ac9c8743 100644 --- a/couchbase-sdk/pom.xml +++ b/couchbase-sdk/pom.xml @@ -46,11 +46,6 @@ jcl-over-slf4j ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/deltaspike/pom.xml b/deltaspike/pom.xml index 141b5b0da6..8135ced13a 100644 --- a/deltaspike/pom.xml +++ b/deltaspike/pom.xml @@ -201,12 +201,6 @@ querydsl-jpa ${querydsl.version} - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - diff --git a/disruptor/pom.xml b/disruptor/pom.xml index 2523cc2125..865a87596a 100644 --- a/disruptor/pom.xml +++ b/disruptor/pom.xml @@ -40,11 +40,6 @@ jcl-over-slf4j ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/feign/pom.xml b/feign/pom.xml index 160f37ec2c..de086a3e43 100644 --- a/feign/pom.xml +++ b/feign/pom.xml @@ -18,7 +18,6 @@ UTF-8 9.4.0 1.7.21 - 2.7 1.16.12 4.12 3.6.0 @@ -52,16 +51,6 @@ slf4j-api ${slf4j.version} - - org.apache.logging.log4j - log4j-core - ${log4j.version} - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j.version} - org.projectlombok lombok diff --git a/feign/src/main/resources/log4j2.xml b/feign/src/main/resources/log4j2.xml deleted file mode 100644 index 659c5fda0e..0000000000 --- a/feign/src/main/resources/log4j2.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/guava/pom.xml b/guava/pom.xml index 0edbb90efd..447ee47cfc 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -76,11 +76,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/handling-spring-static-resources/pom.xml b/handling-spring-static-resources/pom.xml index 9a14ce9372..1e892ed237 100644 --- a/handling-spring-static-resources/pom.xml +++ b/handling-spring-static-resources/pom.xml @@ -155,11 +155,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/httpclient/pom.xml b/httpclient/pom.xml index eec705b224..8f499d4a74 100644 --- a/httpclient/pom.xml +++ b/httpclient/pom.xml @@ -80,11 +80,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/jackson/pom.xml b/jackson/pom.xml index 8e627c146b..df2f65d359 100644 --- a/jackson/pom.xml +++ b/jackson/pom.xml @@ -154,11 +154,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/java-cassandra/pom.xml b/java-cassandra/pom.xml index 5796043b95..dfc5452617 100644 --- a/java-cassandra/pom.xml +++ b/java-cassandra/pom.xml @@ -49,11 +49,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - junit diff --git a/jsf/pom.xml b/jsf/pom.xml index 271a869576..41c90824b6 100644 --- a/jsf/pom.xml +++ b/jsf/pom.xml @@ -92,11 +92,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/rest-testing/pom.xml b/rest-testing/pom.xml index 746752133c..e3231c4fb4 100644 --- a/rest-testing/pom.xml +++ b/rest-testing/pom.xml @@ -69,11 +69,6 @@ ${org.slf4j.version} runtime - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/solr/pom.xml b/solr/pom.xml index e784d87157..cc3a6165fe 100644 --- a/solr/pom.xml +++ b/solr/pom.xml @@ -20,11 +20,6 @@ solr-solrj 6.4.1 - - log4j - log4j - 1.2.16 - junit junit diff --git a/spring-all/pom.xml b/spring-all/pom.xml index 1b12d7e42c..076465f2f6 100644 --- a/spring-all/pom.xml +++ b/spring-all/pom.xml @@ -129,10 +129,6 @@ jcl-over-slf4j - - org.slf4j - log4j-over-slf4j - diff --git a/spring-all/src/main/java/org/baeldung/scopes/ScopesController.java b/spring-all/src/main/java/org/baeldung/scopes/ScopesController.java index 1e3d5f3b14..73df386aff 100644 --- a/spring-all/src/main/java/org/baeldung/scopes/ScopesController.java +++ b/spring-all/src/main/java/org/baeldung/scopes/ScopesController.java @@ -2,14 +2,16 @@ package org.baeldung.scopes; import javax.annotation.Resource; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class ScopesController { - public static final Logger LOG = Logger.getLogger(ScopesController.class); + public static final Logger LOG = LoggerFactory.getLogger(ScopesController.class); @Resource(name = "requestMessage") HelloMessageGenerator requestMessage; diff --git a/spring-all/src/main/java/org/baeldung/startup/AllStrategiesExampleBean.java b/spring-all/src/main/java/org/baeldung/startup/AllStrategiesExampleBean.java index d4334437f7..f36b8703ea 100644 --- a/spring-all/src/main/java/org/baeldung/startup/AllStrategiesExampleBean.java +++ b/spring-all/src/main/java/org/baeldung/startup/AllStrategiesExampleBean.java @@ -1,6 +1,8 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.beans.factory.InitializingBean; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @@ -11,7 +13,7 @@ import javax.annotation.PostConstruct; @Scope(value = "prototype") public class AllStrategiesExampleBean implements InitializingBean { - private static final Logger LOG = Logger.getLogger(AllStrategiesExampleBean.class); + private static final Logger LOG = LoggerFactory.getLogger(AllStrategiesExampleBean.class); public AllStrategiesExampleBean() { LOG.info("Constructor"); diff --git a/spring-all/src/main/java/org/baeldung/startup/EventListenerExampleBean.java b/spring-all/src/main/java/org/baeldung/startup/EventListenerExampleBean.java index e9cd1a159d..58e42337cc 100644 --- a/spring-all/src/main/java/org/baeldung/startup/EventListenerExampleBean.java +++ b/spring-all/src/main/java/org/baeldung/startup/EventListenerExampleBean.java @@ -1,13 +1,15 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component; @Component public class EventListenerExampleBean { - private static final Logger LOG = Logger.getLogger(EventListenerExampleBean.class); + private static final Logger LOG = LoggerFactory.getLogger(EventListenerExampleBean.class); public static int counter; diff --git a/spring-all/src/main/java/org/baeldung/startup/InitMethodExampleBean.java b/spring-all/src/main/java/org/baeldung/startup/InitMethodExampleBean.java index cea6b026d6..f3d30011f8 100644 --- a/spring-all/src/main/java/org/baeldung/startup/InitMethodExampleBean.java +++ b/spring-all/src/main/java/org/baeldung/startup/InitMethodExampleBean.java @@ -1,23 +1,24 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import java.util.Arrays; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; -import java.util.Arrays; - @Component @Scope(value = "prototype") public class InitMethodExampleBean { - private static final Logger LOG = Logger.getLogger(InitMethodExampleBean.class); + private static final Logger LOG = LoggerFactory.getLogger(InitMethodExampleBean.class); @Autowired private Environment environment; public void init() { - LOG.info(Arrays.asList(environment.getDefaultProfiles())); + LOG.info("Env Default Profiles", Arrays.asList(environment.getDefaultProfiles())); } } diff --git a/spring-all/src/main/java/org/baeldung/startup/InitializingBeanExampleBean.java b/spring-all/src/main/java/org/baeldung/startup/InitializingBeanExampleBean.java index 33b14864f3..5d6f8c9d88 100644 --- a/spring-all/src/main/java/org/baeldung/startup/InitializingBeanExampleBean.java +++ b/spring-all/src/main/java/org/baeldung/startup/InitializingBeanExampleBean.java @@ -1,25 +1,26 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import java.util.Arrays; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; -import java.util.Arrays; - @Component @Scope(value = "prototype") public class InitializingBeanExampleBean implements InitializingBean { - private static final Logger LOG = Logger.getLogger(InitializingBeanExampleBean.class); + private static final Logger LOG = LoggerFactory.getLogger(InitializingBeanExampleBean.class); @Autowired private Environment environment; @Override public void afterPropertiesSet() throws Exception { - LOG.info(Arrays.asList(environment.getDefaultProfiles())); + LOG.info("Env Default Profiles", Arrays.asList(environment.getDefaultProfiles())); } } diff --git a/spring-all/src/main/java/org/baeldung/startup/LogicInConstructorExampleBean.java b/spring-all/src/main/java/org/baeldung/startup/LogicInConstructorExampleBean.java index 2a7b3e26c7..d25a83942a 100644 --- a/spring-all/src/main/java/org/baeldung/startup/LogicInConstructorExampleBean.java +++ b/spring-all/src/main/java/org/baeldung/startup/LogicInConstructorExampleBean.java @@ -1,25 +1,22 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import java.util.Arrays; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; -import java.util.Arrays; - @Component @Scope(value = "prototype") public class LogicInConstructorExampleBean { - private static final Logger LOG = Logger.getLogger(LogicInConstructorExampleBean.class); - - private final Environment environment; + private static final Logger LOG = LoggerFactory.getLogger(LogicInConstructorExampleBean.class); @Autowired public LogicInConstructorExampleBean(Environment environment) { - this.environment = environment; - - LOG.info(Arrays.asList(environment.getDefaultProfiles())); + LOG.info("Env Default Profiles", Arrays.asList(environment.getDefaultProfiles())); } } diff --git a/spring-all/src/main/java/org/baeldung/startup/PostConstructExampleBean.java b/spring-all/src/main/java/org/baeldung/startup/PostConstructExampleBean.java index 4cabaad4df..2397c3a0a2 100644 --- a/spring-all/src/main/java/org/baeldung/startup/PostConstructExampleBean.java +++ b/spring-all/src/main/java/org/baeldung/startup/PostConstructExampleBean.java @@ -1,25 +1,27 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import java.util.Arrays; + +import javax.annotation.PostConstruct; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; -import java.util.Arrays; - @Component @Scope(value = "prototype") public class PostConstructExampleBean { - private static final Logger LOG = Logger.getLogger(PostConstructExampleBean.class); + private static final Logger LOG = LoggerFactory.getLogger(PostConstructExampleBean.class); @Autowired private Environment environment; @PostConstruct public void init() { - LOG.info(Arrays.asList(environment.getDefaultProfiles())); + LOG.info("Env Default Profiles", Arrays.asList(environment.getDefaultProfiles())); } } diff --git a/spring-all/src/main/java/org/baeldung/startup/StartupApplicationListenerExample.java b/spring-all/src/main/java/org/baeldung/startup/StartupApplicationListenerExample.java index 32a63f0c1a..e02388dea3 100644 --- a/spring-all/src/main/java/org/baeldung/startup/StartupApplicationListenerExample.java +++ b/spring-all/src/main/java/org/baeldung/startup/StartupApplicationListenerExample.java @@ -1,6 +1,8 @@ package org.baeldung.startup; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; @@ -8,7 +10,7 @@ import org.springframework.stereotype.Component; @Component public class StartupApplicationListenerExample implements ApplicationListener { - private static final Logger LOG = Logger.getLogger(StartupApplicationListenerExample.class); + private static final Logger LOG = LoggerFactory.getLogger(StartupApplicationListenerExample.class); public static int counter; diff --git a/spring-amqp-simple/src/main/java/com/baeldung/springamqpsimple/MessageConsumer.java b/spring-amqp-simple/src/main/java/com/baeldung/springamqpsimple/MessageConsumer.java index b757dfebe8..58a59bf245 100644 --- a/spring-amqp-simple/src/main/java/com/baeldung/springamqpsimple/MessageConsumer.java +++ b/spring-amqp-simple/src/main/java/com/baeldung/springamqpsimple/MessageConsumer.java @@ -1,13 +1,14 @@ package com.baeldung.springamqpsimple; -import org.apache.log4j.LogManager; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.stereotype.Component; @Component public class MessageConsumer { - private static final Logger logger = LogManager.getLogger(MessageConsumer.class); + private static final Logger logger = LoggerFactory.getLogger(MessageConsumer.class); public void receiveMessage(String message) { logger.info("Received Message: " + message); diff --git a/spring-apache-camel/pom.xml b/spring-apache-camel/pom.xml index da7dad1a1f..04d07426d3 100644 --- a/spring-apache-camel/pom.xml +++ b/spring-apache-camel/pom.xml @@ -48,11 +48,6 @@ spring-context ${env.spring.version} - - org.slf4j - slf4j-log4j12 - 1.7.21 - org.apache.camel camel-spring-javaconfig diff --git a/spring-apache-camel/src/main/resources/log4j.xml b/spring-apache-camel/src/main/resources/log4j.xml deleted file mode 100644 index 4a86fb2357..0000000000 --- a/spring-apache-camel/src/main/resources/log4j.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-data-cassandra/pom.xml b/spring-data-cassandra/pom.xml index ef664fef79..316eb2f58b 100644 --- a/spring-data-cassandra/pom.xml +++ b/spring-data-cassandra/pom.xml @@ -94,11 +94,6 @@ jcl-over-slf4j ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-data-couchbase-2/pom.xml b/spring-data-couchbase-2/pom.xml index 9284234638..b3933d9fcd 100644 --- a/spring-data-couchbase-2/pom.xml +++ b/spring-data-couchbase-2/pom.xml @@ -56,11 +56,6 @@ jcl-over-slf4j ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-data-elasticsearch/pom.xml b/spring-data-elasticsearch/pom.xml index b38a6a10bc..f4a43fac09 100644 --- a/spring-data-elasticsearch/pom.xml +++ b/spring-data-elasticsearch/pom.xml @@ -71,11 +71,6 @@ jcl-over-slf4j ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - org.elasticsearch diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml index e5389c1d34..3352baa6aa 100644 --- a/spring-data-mongodb/pom.xml +++ b/spring-data-mongodb/pom.xml @@ -68,12 +68,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - - com.querydsl querydsl-mongodb diff --git a/spring-data-redis/pom.xml b/spring-data-redis/pom.xml index 9700dd7091..720526932e 100644 --- a/spring-data-redis/pom.xml +++ b/spring-data-redis/pom.xml @@ -13,7 +13,6 @@ 1.7.5.RELEASE 3.2.4 2.9.0 - 1.2.17 4.12 0.10.0 2.19.1 @@ -32,12 +31,6 @@ ${cglib.version} - - log4j - log4j - ${log4j.version} - - redis.clients jedis diff --git a/spring-data-solr/pom.xml b/spring-data-solr/pom.xml index fd6c442abf..0019c7ff9c 100644 --- a/spring-data-solr/pom.xml +++ b/spring-data-solr/pom.xml @@ -14,7 +14,6 @@ 4.3.4.RELEASE 2.19.1 2.0.5.RELEASE - 1.2.17 4.12 @@ -34,11 +33,6 @@ spring-context ${spring.version} - - log4j - log4j - ${log4j.version} - junit junit diff --git a/spring-dispatcher-servlet/pom.xml b/spring-dispatcher-servlet/pom.xml index 13ad062195..e4812485c1 100644 --- a/spring-dispatcher-servlet/pom.xml +++ b/spring-dispatcher-servlet/pom.xml @@ -36,16 +36,7 @@ slf4j-api ${org.slf4j.version} - - org.apache.logging.log4j - log4j-core - ${log4j.version} - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j.version} - + @@ -87,7 +78,6 @@ 1.7.21 - 2.7 3.1.0 diff --git a/spring-dispatcher-servlet/src/main/resources/log4j2.xml b/spring-dispatcher-servlet/src/main/resources/log4j2.xml deleted file mode 100644 index fb18e8279a..0000000000 --- a/spring-dispatcher-servlet/src/main/resources/log4j2.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-freemarker/src/main/resources/log4j.xml b/spring-freemarker/src/main/resources/log4j.xml deleted file mode 100644 index ae7d4b5ca4..0000000000 --- a/spring-freemarker/src/main/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-freemarker/src/test/resources/log4j.xml b/spring-freemarker/src/test/resources/log4j.xml deleted file mode 100644 index 9b1538d31a..0000000000 --- a/spring-freemarker/src/test/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration/pom.xml b/spring-integration/pom.xml index 0aa8fed598..a243f55507 100644 --- a/spring-integration/pom.xml +++ b/spring-integration/pom.xml @@ -16,7 +16,6 @@ 1.1.4.RELEASE 1.4.7 1.1.1 - 1.2.17 4.12 2.10 @@ -109,11 +108,6 @@ mail ${javax-mail.version} - - log4j - log4j - ${log4j.version} - org.springframework.integration spring-integration-twitter diff --git a/spring-integration/src/main/resources/log4j.xml b/spring-integration/src/main/resources/log4j.xml deleted file mode 100644 index cfa93a8037..0000000000 --- a/spring-integration/src/main/resources/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-mvc-java/pom.xml b/spring-mvc-java/pom.xml index dcf740b22b..5c8f6be6fa 100644 --- a/spring-mvc-java/pom.xml +++ b/spring-mvc-java/pom.xml @@ -116,11 +116,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-mvc-web-vs-initializer/pom.xml b/spring-mvc-web-vs-initializer/pom.xml index 8fe8893903..45ead333f4 100644 --- a/spring-mvc-web-vs-initializer/pom.xml +++ b/spring-mvc-web-vs-initializer/pom.xml @@ -72,10 +72,6 @@ jcl-over-slf4j - - org.slf4j - log4j-over-slf4j - diff --git a/spring-mvc-xml/pom.xml b/spring-mvc-xml/pom.xml index 86eb17da64..60da3404c9 100644 --- a/spring-mvc-xml/pom.xml +++ b/spring-mvc-xml/pom.xml @@ -64,11 +64,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-rest/pom.xml b/spring-rest/pom.xml index 6afe4004c3..9b1b9a2847 100644 --- a/spring-rest/pom.xml +++ b/spring-rest/pom.xml @@ -122,10 +122,6 @@ jcl-over-slf4j - - org.slf4j - log4j-over-slf4j - diff --git a/spring-security-mvc-custom/pom.xml b/spring-security-mvc-custom/pom.xml index 59339ead5e..46e0dc2b17 100644 --- a/spring-security-mvc-custom/pom.xml +++ b/spring-security-mvc-custom/pom.xml @@ -125,11 +125,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-mvc-digest-auth/pom.xml b/spring-security-mvc-digest-auth/pom.xml index dd772e3343..c0f08c1a2a 100644 --- a/spring-security-mvc-digest-auth/pom.xml +++ b/spring-security-mvc-digest-auth/pom.xml @@ -120,11 +120,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-mvc-login/pom.xml b/spring-security-mvc-login/pom.xml index b3431da7dc..fd67873ff1 100644 --- a/spring-security-mvc-login/pom.xml +++ b/spring-security-mvc-login/pom.xml @@ -117,11 +117,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java b/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java index ea4407c5c4..843f5f4dcd 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java +++ b/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java @@ -6,7 +6,9 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.security.access.AccessDeniedException; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; @@ -14,7 +16,7 @@ import org.springframework.security.web.access.AccessDeniedHandler; public class CustomAccessDeniedHandler implements AccessDeniedHandler { - public static final Logger LOG = Logger.getLogger(CustomAccessDeniedHandler.class); + public static final Logger LOG = LoggerFactory.getLogger(CustomAccessDeniedHandler.class); @Override public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException exc) throws IOException, ServletException { diff --git a/spring-security-mvc-persisted-remember-me/pom.xml b/spring-security-mvc-persisted-remember-me/pom.xml index f215c39c6d..7fc15284f0 100644 --- a/spring-security-mvc-persisted-remember-me/pom.xml +++ b/spring-security-mvc-persisted-remember-me/pom.xml @@ -155,11 +155,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-mvc-session/pom.xml b/spring-security-mvc-session/pom.xml index 3f129c83ba..5255bd3737 100644 --- a/spring-security-mvc-session/pom.xml +++ b/spring-security-mvc-session/pom.xml @@ -125,11 +125,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-rest-basic-auth/pom.xml b/spring-security-rest-basic-auth/pom.xml index 953cfd6b6b..0be9b664e2 100644 --- a/spring-security-rest-basic-auth/pom.xml +++ b/spring-security-rest-basic-auth/pom.xml @@ -172,11 +172,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-rest-custom/pom.xml b/spring-security-rest-custom/pom.xml index d421f8d7b4..0fe642c2b6 100644 --- a/spring-security-rest-custom/pom.xml +++ b/spring-security-rest-custom/pom.xml @@ -177,10 +177,6 @@ jcl-over-slf4j - - org.slf4j - log4j-over-slf4j - diff --git a/spring-security-rest-digest-auth/pom.xml b/spring-security-rest-digest-auth/pom.xml index dc8e12b72b..e2fcd330f5 100644 --- a/spring-security-rest-digest-auth/pom.xml +++ b/spring-security-rest-digest-auth/pom.xml @@ -166,11 +166,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-rest-full/pom.xml b/spring-security-rest-full/pom.xml index 43d14af5ea..290aa48dea 100644 --- a/spring-security-rest-full/pom.xml +++ b/spring-security-rest-full/pom.xml @@ -226,10 +226,6 @@ jcl-over-slf4j - - org.slf4j - log4j-over-slf4j - diff --git a/spring-security-rest/pom.xml b/spring-security-rest/pom.xml index 996161c721..6052f7d42e 100644 --- a/spring-security-rest/pom.xml +++ b/spring-security-rest/pom.xml @@ -145,11 +145,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - diff --git a/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java b/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java index 9a69528efe..456eeaaeac 100644 --- a/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java +++ b/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java @@ -2,7 +2,9 @@ package org.baeldung.web.controller; import java.util.concurrent.Callable; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.baeldung.web.service.AsyncService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.context.SecurityContextHolder; @@ -14,7 +16,7 @@ import org.springframework.web.bind.annotation.ResponseBody; @Controller public class AsyncController { - private static final Logger log = Logger.getLogger(AsyncService.class); + private static final Logger log = LoggerFactory.getLogger(AsyncService.class); @Autowired private AsyncService asyncService; diff --git a/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java b/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java index fb954a49a7..caaaa8e0dc 100644 --- a/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java +++ b/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java @@ -2,7 +2,9 @@ package org.baeldung.web.service; import java.util.concurrent.Callable; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.springframework.scheduling.annotation.Async; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; @@ -10,7 +12,7 @@ import org.springframework.stereotype.Service; @Service public class AsyncServiceImpl implements AsyncService { - private static final Logger log = Logger.getLogger(AsyncService.class); + private static final Logger log = LoggerFactory.getLogger(AsyncService.class); @Async @Override diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index be443e15df..7082441ceb 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -102,11 +102,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - javax.servlet diff --git a/video-tutorials/jackson-annotations/pom.xml b/video-tutorials/jackson-annotations/pom.xml index e321544d4e..07c5d9e863 100644 --- a/video-tutorials/jackson-annotations/pom.xml +++ b/video-tutorials/jackson-annotations/pom.xml @@ -151,12 +151,6 @@ ${org.slf4j.version} - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - -