diff --git a/advanced/advanced-testing-examples/pom.xml b/advanced/advanced-testing-examples/pom.xml
index 566c9e6c..d63b2bed 100644
--- a/advanced/advanced-testing-examples/pom.xml
+++ b/advanced/advanced-testing-examples/pom.xml
@@ -57,22 +57,46 @@
javax.jms-api
2.0.1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-jms
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-groovy
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -80,6 +104,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -91,6 +119,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -98,6 +132,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -108,6 +146,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -127,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java b/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java
index 5bd459c5..41790b38 100644
--- a/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java
+++ b/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java
@@ -31,7 +31,8 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.jms.JMSException;
import javax.jms.TextMessage;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -65,7 +66,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
public class JmsMockTests {
- private static final Logger LOGGER = Logger.getLogger(JmsMockTests.class);
+ private static final Log LOGGER = LogFactory.getLog(JmsMockTests.class);
private final AtomicReference testMessageHolder = new AtomicReference<>();
@@ -234,6 +235,7 @@ public class JmsMockTests {
* org.springframework.integration.core.MessageHandler#handleMessage
* (org.springframework.integration.Message)
*/
+ @Override
public void handleMessage(Message> message) throws MessagingException {
verifyMessage(message);
latch.countDown();
@@ -241,4 +243,4 @@ public class JmsMockTests {
}
-}
\ No newline at end of file
+}
diff --git a/advanced/advanced-testing-examples/src/test/resources/log4j.xml b/advanced/advanced-testing-examples/src/test/resources/log4j.xml
deleted file mode 100644
index de52c70f..00000000
--- a/advanced/advanced-testing-examples/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/advanced/advanced-testing-examples/src/test/resources/log4j2.xml b/advanced/advanced-testing-examples/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/advanced/advanced-testing-examples/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/advanced/dynamic-ftp/pom.xml b/advanced/dynamic-ftp/pom.xml
index a2ced39e..e0887e2f 100644
--- a/advanced/dynamic-ftp/pom.xml
+++ b/advanced/dynamic-ftp/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-ftp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/advanced/dynamic-ftp/src/test/resources/log4j.xml b/advanced/dynamic-ftp/src/test/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/advanced/dynamic-ftp/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/advanced/dynamic-ftp/src/test/resources/log4j2.xml b/advanced/dynamic-ftp/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/advanced/dynamic-ftp/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/advanced/dynamic-tcp-client/pom.xml b/advanced/dynamic-tcp-client/pom.xml
index f8198e14..c036e561 100644
--- a/advanced/dynamic-tcp-client/pom.xml
+++ b/advanced/dynamic-tcp-client/pom.xml
@@ -61,11 +61,23 @@
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ip
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -73,6 +85,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -84,6 +100,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -91,6 +113,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -101,11 +127,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -133,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/advanced/dynamic-tcp-client/src/main/resources/logback.xml b/advanced/dynamic-tcp-client/src/main/resources/logback.xml
new file mode 100644
index 00000000..c0fe0db4
--- /dev/null
+++ b/advanced/dynamic-tcp-client/src/main/resources/logback.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/cafe-scripted/pom.xml b/applications/cafe-scripted/pom.xml
index ec1fb0b0..63b5d066 100644
--- a/applications/cafe-scripted/pom.xml
+++ b/applications/cafe-scripted/pom.xml
@@ -56,45 +56,93 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-groovy
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-rmi
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-jmx
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.jruby
jruby
1.7.12
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.python
jython-standalone
2.5.3
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.codehaus.groovy
groovy-all
2.3.0
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -102,6 +150,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -113,6 +165,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -120,6 +178,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -130,6 +192,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -149,14 +217,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/demo/ControlBusMain.java b/applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/demo/ControlBusMain.java
index 95c7cec0..b03a7be9 100644
--- a/applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/demo/ControlBusMain.java
+++ b/applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/demo/ControlBusMain.java
@@ -1,56 +1,57 @@
/*
- * Copyright 2002-2011 the original author or authors.
- *
+ * Copyright 2002-2017 the original author or authors.
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.springframework.integration.samples.cafe.demo;
-
-import org.apache.log4j.Logger;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-
import org.springframework.integration.samples.cafe.WaiterMonitor;
/**
* Sets up a remote connection to the CafeDemoApp to manage it using the Groovy Control Bus.
- * The WaiterMonitor queries the total delivered orders every second.
+ * The WaiterMonitor queries the total delivered orders every second.
* If totalDeliveries >= 3, stop the cafe inbound adapter.
- *
+ *
* @author David Turanski
+ * @author Gary Russell
*
*/
public class ControlBusMain {
- private static Logger logger = Logger.getLogger(ControlBusMain.class);
-
+ private static Log logger = LogFactory.getLog(ControlBusMain.class);
+
public static void main(String[] args) {
-
- AbstractApplicationContext context =
+
+ AbstractApplicationContext context =
new ClassPathXmlApplicationContext("/META-INF/spring/integration/cafeDemo-control-bus.xml");
-
+
WaiterMonitor waiterMonitor = (WaiterMonitor) context.getBean("waiterMonitor");
-
+
int totalDeliveries = 0;
while (totalDeliveries <= 3) {
try {
Thread.sleep(1000);
}
catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ logger.error("Interrupted", e);
}
-
+
totalDeliveries = (Integer)waiterMonitor.sendControlScript("waiter.totalDeliveries");
-
+
logger.info("Total cafe deliveries: " + totalDeliveries);
-
+
if (totalDeliveries > 3) {
logger.info("stopping orders...");
waiterMonitor.sendControlScript("cafe.stop()");
diff --git a/applications/cafe-scripted/src/main/resources/log4j.xml b/applications/cafe-scripted/src/main/resources/log4j.xml
deleted file mode 100644
index 00e7276b..00000000
--- a/applications/cafe-scripted/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/cafe-scripted/src/main/resources/log4j2.xml b/applications/cafe-scripted/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..3e65e17e
--- /dev/null
+++ b/applications/cafe-scripted/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/cafe/cafe-amqp/pom.xml b/applications/cafe/cafe-amqp/pom.xml
index ac471e1b..26597d0c 100644
--- a/applications/cafe/cafe-amqp/pom.xml
+++ b/applications/cafe/cafe-amqp/pom.xml
@@ -57,17 +57,35 @@
cafe-si
5.0.0.BUILD-SNAPSHOT
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-amqp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/cafe/cafe-amqp/src/main/resources/log4j.xml b/applications/cafe/cafe-amqp/src/main/resources/log4j.xml
deleted file mode 100644
index 317bd182..00000000
--- a/applications/cafe/cafe-amqp/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/cafe/cafe-amqp/src/main/resources/log4j2.xml b/applications/cafe/cafe-amqp/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..dbab18be
--- /dev/null
+++ b/applications/cafe/cafe-amqp/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/cafe/cafe-jms/pom.xml b/applications/cafe/cafe-jms/pom.xml
index a463afa4..f3bd655b 100644
--- a/applications/cafe/cafe-jms/pom.xml
+++ b/applications/cafe/cafe-jms/pom.xml
@@ -57,12 +57,24 @@
cafe-si
5.0.0.BUILD-SNAPSHOT
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.activemq
activemq-broker
5.13.4
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.activemq
@@ -70,6 +82,10 @@
5.13.4
compile
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.springframework
@@ -80,18 +96,36 @@
org.springframework.integration
spring-integration-jms
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
javax.jms
javax.jms-api
2.0.1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -99,6 +133,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -110,6 +148,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -117,6 +161,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -127,6 +175,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -146,14 +200,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/cafe/cafe-jms/src/main/resources/log4j.xml b/applications/cafe/cafe-jms/src/main/resources/log4j.xml
deleted file mode 100644
index 317bd182..00000000
--- a/applications/cafe/cafe-jms/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/cafe/cafe-jms/src/main/resources/log4j2.xml b/applications/cafe/cafe-jms/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..7d458a82
--- /dev/null
+++ b/applications/cafe/cafe-jms/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/cafe/cafe-si/pom.xml b/applications/cafe/cafe-si/pom.xml
index 6a8d0355..9dcbf82e 100644
--- a/applications/cafe/cafe-si/pom.xml
+++ b/applications/cafe/cafe-si/pom.xml
@@ -56,18 +56,36 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.fasterxml.jackson.core
jackson-databind
2.3.2
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java b/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java
index 0fac9cce..660ad59c 100644
--- a/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java
+++ b/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,28 +18,33 @@ package org.springframework.integration.samples.cafe.annotation;
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.samples.cafe.Drink;
import org.springframework.integration.samples.cafe.OrderItem;
-import org.apache.log4j.Logger;
-import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.stereotype.Component;
/**
* @author Mark Fisher
* @author Marius Bogoevici
* @author Tom McCuch
+ * @author Gary Russell
*/
@Component
public class Barista {
- private static Logger logger = Logger.getLogger(Barista.class);
+
+ private static Log logger = LogFactory.getLog(Barista.class);
+
private long hotDrinkDelay = 5000;
private long coldDrinkDelay = 1000;
- private AtomicInteger hotDrinkCounter = new AtomicInteger();
+ private final AtomicInteger hotDrinkCounter = new AtomicInteger();
- private AtomicInteger coldDrinkCounter = new AtomicInteger();
+ private final AtomicInteger coldDrinkCounter = new AtomicInteger();
public void setHotDrinkDelay(long hotDrinkDelay) {
diff --git a/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java b/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java
index 5466e093..42c8905a 100644
--- a/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java
+++ b/applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,25 +18,30 @@ package org.springframework.integration.samples.cafe.xml;
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.samples.cafe.Drink;
import org.springframework.integration.samples.cafe.OrderItem;
-import org.apache.log4j.Logger;
/**
* @author Mark Fisher
* @author Marius Bogoevici
* @author Tom McCuch
+ * @author Gary Russell
*/
public class Barista {
- private static Logger logger = Logger.getLogger(Barista.class);
+
+ private static Log logger = LogFactory.getLog(Barista.class);
+
private long hotDrinkDelay = 5000;
private long coldDrinkDelay = 1000;
- private AtomicInteger hotDrinkCounter = new AtomicInteger();
+ private final AtomicInteger hotDrinkCounter = new AtomicInteger();
- private AtomicInteger coldDrinkCounter = new AtomicInteger();
+ private final AtomicInteger coldDrinkCounter = new AtomicInteger();
public void setHotDrinkDelay(long hotDrinkDelay) {
diff --git a/applications/cafe/cafe-si/src/main/resources/log4j.xml b/applications/cafe/cafe-si/src/main/resources/log4j.xml
deleted file mode 100644
index 317bd182..00000000
--- a/applications/cafe/cafe-si/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/cafe/cafe-si/src/main/resources/log4j2.xml b/applications/cafe/cafe-si/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..7d458a82
--- /dev/null
+++ b/applications/cafe/cafe-si/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/file-split-ftp/pom.xml b/applications/file-split-ftp/pom.xml
index 63fb89ca..ad95b3d0 100644
--- a/applications/file-split-ftp/pom.xml
+++ b/applications/file-split-ftp/pom.xml
@@ -61,38 +61,80 @@
org.springframework.boot
spring-boot-starter-web
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ftp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-http
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-mail
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
javax.mail
javax.mail-api
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.sun.mail
javax.mail
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -100,6 +142,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -111,6 +157,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -118,6 +170,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -128,16 +184,34 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -165,14 +239,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/loan-broker/pom.xml b/applications/loan-broker/pom.xml
index f30e4472..c402d94d 100644
--- a/applications/loan-broker/pom.xml
+++ b/applications/loan-broker/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-ip
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java
index 35ef6a74..0b4a2b21 100644
--- a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java
+++ b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,9 @@ package org.springframework.integration.samples.loanbroker.demo;
import java.util.List;
-import org.apache.log4j.Logger;
-import org.springframework.context.ApplicationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.loanbroker.LoanBrokerGateway;
import org.springframework.integration.samples.loanbroker.domain.Customer;
@@ -28,17 +29,19 @@ import org.springframework.integration.samples.loanbroker.domain.LoanRequest;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*/
public class LoanBrokerDemo {
- private static Logger logger = Logger.getLogger(LoanBrokerDemo.class);
+ private static Log logger = LogFactory.getLog(LoanBrokerDemo.class);
public static void main(String[] args) {
new LoanBrokerDemo().runDemo();
}
public void runDemo() {
- ApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring/integration/bootstrap-config/stubbed-loan-broker.xml");
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+ "META-INF/spring/integration/bootstrap-config/stubbed-loan-broker.xml");
LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class);
LoanRequest loanRequest = new LoanRequest();
loanRequest.setCustomer(new Customer());
@@ -50,6 +53,7 @@ public class LoanBrokerDemo {
for (LoanQuote loanQuote : loanQuotes) {
logger.info(loanQuote);
}
+ context.close();
}
}
diff --git a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java
index daef1504..65edc895 100644
--- a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java
+++ b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@ package org.springframework.integration.samples.loanbroker.demo;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.loanbroker.LoanBrokerGateway;
@@ -31,10 +33,10 @@ import org.springframework.integration.samples.loanbroker.domain.LoanRequest;
*/
public class LoanBrokerSharkDetectorDemo {
- private static Logger logger = Logger.getLogger(LoanBrokerSharkDetectorDemo.class);
+ private static Log logger = LogFactory.getLog(LoanBrokerSharkDetectorDemo.class);
public static void main(String[] args) {
- ConfigurableApplicationContext context =
+ ConfigurableApplicationContext context =
new ClassPathXmlApplicationContext("META-INF/spring/integration/bootstrap-config/stubbed-loan-broker-multicast.xml");
LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class);
LoanRequest loanRequest = new LoanRequest();
@@ -46,6 +48,7 @@ public class LoanBrokerSharkDetectorDemo {
for (LoanQuote loanQuote : loanQuotes) {
logger.info(loanQuote);
}
+ context.close();
}
}
diff --git a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java
index ddd8ea5e..724c0a26 100644
--- a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java
+++ b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,17 +18,19 @@ package org.springframework.integration.samples.loanbroker.stubs;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.integration.samples.loanbroker.domain.CreditReport;
import org.springframework.integration.samples.loanbroker.domain.LoanRequest;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*/
public class CreditBureauStub {
- private static Logger logger = Logger.getLogger(CreditBureauStub.class);
+ private static Log logger = LogFactory.getLog(CreditBureauStub.class);
/**
* @param loanRequest the loan request
diff --git a/applications/loan-broker/src/main/resources/log4j.xml b/applications/loan-broker/src/main/resources/log4j.xml
deleted file mode 100644
index dbd3e859..00000000
--- a/applications/loan-broker/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/loan-broker/src/main/resources/log4j2.xml b/applications/loan-broker/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/applications/loan-broker/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/loan-broker/src/test/resources/log4j.xml b/applications/loan-broker/src/test/resources/log4j.xml
deleted file mode 100644
index d91ac270..00000000
--- a/applications/loan-broker/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/loanshark/pom.xml b/applications/loanshark/pom.xml
index 10084296..89bbc43f 100644
--- a/applications/loanshark/pom.xml
+++ b/applications/loanshark/pom.xml
@@ -56,155 +56,509 @@
org.springframework.integration
spring-integration-ip
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-webmvc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-orm
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-aop
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-aspects
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.aspectj
aspectjtools
1.8.9
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-jdbc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-tx
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-context
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-fileupload
commons-fileupload
1.2.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-dbcp
commons-dbcp
1.2.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-digester
commons-digester
2.0
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-pool
commons-pool
1.5.4
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.apache.tiles
tiles-jsp
2.2.1
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
joda-time
joda-time
1.6
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
javax.transaction
jta
1.1
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.hsqldb
hsqldb
2.3.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
net.sf.flexjson
flexjson
2.0
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
javax.validation
validation-api
1.0.0.GA
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.hibernate
hibernate-validator
- 5.2.4.Final
+ 5.4.1.Final
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.eclipse.persistence
javax.persistence
2.0.0
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.hibernate
hibernate-entitymanager
- 5.2.4.Final
+ 5.2.10.Final
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.webflow
spring-js
2.3.3.RELEASE
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.slf4j
slf4j-api
- 1.7.11
+ 1.7.22
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.slf4j
slf4j-log4j12
- 1.7.11
+ 1.7.22
runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.slf4j
jcl-over-slf4j
- 1.7.11
+ 1.7.22
runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -212,6 +566,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -223,6 +581,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -230,6 +594,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -240,6 +608,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -274,14 +648,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/loanshark/src/main/resources/log4j.xml b/applications/loanshark/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/applications/loanshark/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/loanshark/src/main/resources/log4j2.xml b/applications/loanshark/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/applications/loanshark/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/loanshark/src/test/resources/log4j.xml b/applications/loanshark/src/test/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/applications/loanshark/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/applications/stomp-chat/pom.xml b/applications/stomp-chat/pom.xml
index b9223798..541c03bf 100644
--- a/applications/stomp-chat/pom.xml
+++ b/applications/stomp-chat/pom.xml
@@ -61,21 +61,45 @@
org.springframework.boot
spring-boot-starter-websocket
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-websocket
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-event
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-groovy
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -83,6 +107,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -94,6 +122,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -101,6 +135,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -111,11 +149,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -143,14 +193,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/applications/stomp-chat/src/main/resources/logback.xml b/applications/stomp-chat/src/main/resources/logback.xml
new file mode 100644
index 00000000..070671ef
--- /dev/null
+++ b/applications/stomp-chat/src/main/resources/logback.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
diff --git a/basic/amqp-affinity/pom.xml b/basic/amqp-affinity/pom.xml
deleted file mode 100644
index 45c9ba0e..00000000
--- a/basic/amqp-affinity/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
- 4.0.0
- org.springframework.integration.samples
- amqp-affinity
- 5.0.0.BUILD-SNAPSHOT
- http://projects.spring.io/spring-integration
-
- SpringIO
- https://spring.io
-
-
-
- The Apache Software License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
-
- garyrussell
- Gary Russell
- grussell@pivotal.io
-
- project lead
-
-
-
- markfisher
- Mark Fisher
- mfisher@pivotal.io
-
- project founder and lead emeritus
-
-
-
- ghillert
- Gunnar Hillert
- ghillert@pivotal.io
-
-
- abilan
- Artem Bilan
- abilan@pivotal.io
-
-
-
- scm:git:scm:git:git://github.com/spring-projects/spring-integration-samples.git
- scm:git:scm:git:ssh://git@github.com:spring-projects/spring-integration-samples.git
- https://github.com/spring-projects/spring-integration-samples
-
-
-
- junit
- junit
- 4.12
- test
-
-
- *
- org.hamcrest
-
-
-
-
- org.hamcrest
- hamcrest-all
- 1.3
- test
-
-
- org.mockito
- mockito-core
- 1.10.19
- test
-
-
- *
- org.hamcrest
-
-
-
-
- org.springframework
- spring-test
- test
-
-
-
-
- repo.spring.io.milestone
- Spring Framework Maven Milestone Repository
- https://repo.spring.io/libs-milestone
-
-
- repo.spring.io.snapshot
- Spring Framework Maven Snapshot Repository
- https://repo.spring.io/libs-snapshot
-
-
-
-
-
- org.springframework.integration
- spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
- import
- pom
-
-
- org.springframework
- spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
- import
- pom
-
-
-
-
diff --git a/basic/amqp/pom.xml b/basic/amqp/pom.xml
index 8b96dccc..9b1ad36f 100644
--- a/basic/amqp/pom.xml
+++ b/basic/amqp/pom.xml
@@ -56,17 +56,47 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-amqp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+
+
+ org.slf4j
+ slf4j-jcl
+ 1.7.22
+ runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -74,6 +104,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -85,6 +119,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -92,6 +132,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -102,6 +146,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -121,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SamplePubConfirmsReturns.java b/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SamplePubConfirmsReturns.java
index 10ff8af2..28842b5e 100644
--- a/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SamplePubConfirmsReturns.java
+++ b/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SamplePubConfirmsReturns.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 the original author or authors.
+ * Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.amqp;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -29,7 +30,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public final class SamplePubConfirmsReturns {
- private static final Logger LOGGER = Logger.getLogger(SamplePubConfirmsReturns.class);
+ private static final Log LOGGER = LogFactory.getLog(SamplePubConfirmsReturns.class);
private SamplePubConfirmsReturns() { }
diff --git a/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SampleSimple.java b/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SampleSimple.java
index 752c8ae6..b6dde55e 100644
--- a/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SampleSimple.java
+++ b/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/SampleSimple.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.amqp;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -24,12 +25,13 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* Starts the Spring Context and will initialize the Spring Integration message flow.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 1.0
*
*/
public final class SampleSimple {
- private static final Logger LOGGER = Logger.getLogger(SampleSimple.class);
+ private static final Log LOGGER = LogFactory.getLog(SampleSimple.class);
private SampleSimple() { }
diff --git a/basic/amqp/src/main/resources/log4j.xml b/basic/amqp/src/main/resources/log4j.xml
deleted file mode 100644
index 094beea2..00000000
--- a/basic/amqp/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/amqp/src/main/resources/log4j2.xml b/basic/amqp/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..db26421a
--- /dev/null
+++ b/basic/amqp/src/main/resources/log4j2.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/barrier/pom.xml b/basic/barrier/pom.xml
index d8350e7f..a9df13e9 100644
--- a/basic/barrier/pom.xml
+++ b/basic/barrier/pom.xml
@@ -61,26 +61,56 @@
org.springframework.boot
spring-boot-starter-web
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-amqp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-amqp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-http
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -88,6 +118,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -99,6 +133,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -106,6 +146,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -116,11 +160,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -148,14 +204,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/control-bus/pom.xml b/basic/control-bus/pom.xml
index bc7e7858..23bd4e05 100644
--- a/basic/control-bus/pom.xml
+++ b/basic/control-bus/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java b/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java
index c1e544ce..86c2ce8d 100644
--- a/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java
+++ b/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.controlbus;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.springframework.context.ConfigurableApplicationContext;
@@ -26,11 +27,12 @@ import org.springframework.messaging.support.GenericMessage;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class ControlBusDemoTest {
- private static Logger logger = Logger.getLogger(ControlBusDemoTest.class);
+ private static Log logger = LogFactory.getLog(ControlBusDemoTest.class);
@Test
public void demoControlBus(){
diff --git a/basic/control-bus/src/test/resources/log4j.xml b/basic/control-bus/src/test/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/control-bus/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/control-bus/src/test/resources/log4j2.xml b/basic/control-bus/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/control-bus/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/enricher/pom.xml b/basic/enricher/pom.xml
index 770f88d7..ccb490e8 100644
--- a/basic/enricher/pom.xml
+++ b/basic/enricher/pom.xml
@@ -56,18 +56,36 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.h2database
h2
- 1.3.175
+ 1.4.194
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/Main.java b/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/Main.java
index 83d89738..50dd603b 100644
--- a/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/Main.java
+++ b/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.enricher.domain.User;
@@ -30,14 +32,16 @@ import org.springframework.integration.samples.enricher.service.UserService;
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @version 1.0
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private static final String LINE_SEPARATOR = "\n==========================================================================";
+
private static final String EMPTY_LINE = "\n ";
private Main() { }
@@ -123,7 +127,8 @@ public final class Main {
LOGGER.info("\n\nExiting application...bye.");
- System.exit(0);
+ scanner.close();
+ context.close();
}
diff --git a/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/service/impl/SystemService.java b/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/service/impl/SystemService.java
index 2d42f2bc..e5ca0239 100644
--- a/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/service/impl/SystemService.java
+++ b/basic/enricher/src/main/java/org/springframework/integration/samples/enricher/service/impl/SystemService.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.enricher.service.impl;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.integration.samples.enricher.domain.User;
@@ -23,11 +24,12 @@ import org.springframework.integration.samples.enricher.domain.User;
* Simple Service class for retrieving user information.
*
* @author Gunnar Hillert
+ * @author Gary Russell
*
*/
public class SystemService {
- private static final Logger LOGGER = Logger.getLogger(SystemService.class);
+ private static final Log LOGGER = LogFactory.getLog(SystemService.class);
/** Default Constructor. */
public SystemService() {
diff --git a/basic/enricher/src/main/resources/log4j.xml b/basic/enricher/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/basic/enricher/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/enricher/src/main/resources/log4j2.xml b/basic/enricher/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/enricher/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/enricher/src/test/java/org/springframework/integration/samples/enricher/service/UserServiceTest.java b/basic/enricher/src/test/java/org/springframework/integration/samples/enricher/service/UserServiceTest.java
index 4a362520..17fbe905 100644
--- a/basic/enricher/src/test/java/org/springframework/integration/samples/enricher/service/UserServiceTest.java
+++ b/basic/enricher/src/test/java/org/springframework/integration/samples/enricher/service/UserServiceTest.java
@@ -20,58 +20,56 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.enricher.domain.User;
-
/**
* Verify that the Spring Integration Application Context starts successfully.
*/
public class UserServiceTest {
- @Test
- public void testStartupOfSpringInegrationContext() throws Exception{
- final ApplicationContext context
- = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
- UserServiceTest.class);
- Thread.sleep(2000);
- }
+ @Test
+ public void testStartupOfSpringInegrationContext() throws Exception {
+ final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/spring-integration-context.xml", UserServiceTest.class);
+ Thread.sleep(2000);
+ context.close();
+ }
- @Test
- public void testExecuteFindUser() {
+ @Test
+ public void testExecuteFindUser() {
- final ApplicationContext context
- = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
- UserServiceTest.class);
+ final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/spring-integration-context.xml", UserServiceTest.class);
- final UserService service = context.getBean(UserService.class);
+ final UserService service = context.getBean(UserService.class);
- User user = new User("foo", null, null);
- final User fullUser = service.findUser(user);
+ User user = new User("foo", null, null);
+ final User fullUser = service.findUser(user);
- assertEquals("foo", fullUser.getUsername());
- assertEquals("foo@springintegration.org", fullUser.getEmail());
- assertEquals("secret", fullUser.getPassword());
+ assertEquals("foo", fullUser.getUsername());
+ assertEquals("foo@springintegration.org", fullUser.getEmail());
+ assertEquals("secret", fullUser.getPassword());
+ context.close();
- }
+ }
- @Test
- public void testExecuteFindUserByUsername() {
+ @Test
+ public void testExecuteFindUserByUsername() {
- final ApplicationContext context
- = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
- UserServiceTest.class);
+ final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/spring-integration-context.xml", UserServiceTest.class);
- final UserService service = context.getBean(UserService.class);
+ final UserService service = context.getBean(UserService.class);
- User user = new User("foo", null, null);
- final User fullUser = service.findUserByUsername(user);
+ User user = new User("foo", null, null);
+ final User fullUser = service.findUserByUsername(user);
- assertEquals("foo", fullUser.getUsername());
- assertEquals("foo@springintegration.org", fullUser.getEmail());
- assertEquals("secret", fullUser.getPassword());
+ assertEquals("foo", fullUser.getUsername());
+ assertEquals("foo@springintegration.org", fullUser.getEmail());
+ assertEquals("secret", fullUser.getPassword());
+ context.close();
- }
+ }
}
diff --git a/basic/feed/pom.xml b/basic/feed/pom.xml
index 4b8150b9..36754137 100644
--- a/basic/feed/pom.xml
+++ b/basic/feed/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-feed
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/feed/src/test/resources/log4j.xml b/basic/feed/src/test/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/basic/feed/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/feed/src/test/resources/log4j2.xml b/basic/feed/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/feed/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/file/pom.xml b/basic/file/pom.xml
index 73ca49aa..3c950a7d 100644
--- a/basic/file/pom.xml
+++ b/basic/file/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-file
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/file/src/test/resources/log4j.xml b/basic/file/src/test/resources/log4j.xml
deleted file mode 100644
index 127e2d13..00000000
--- a/basic/file/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/file/src/test/resources/log4j2.xml b/basic/file/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/file/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/ftp/pom.xml b/basic/ftp/pom.xml
index 351195bd..e4c050ee 100644
--- a/basic/ftp/pom.xml
+++ b/basic/ftp/pom.xml
@@ -56,30 +56,60 @@
org.springframework.integration
spring-integration-ftp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
commons-io
commons-io
2.4
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.ftpserver
ftpserver-core
1.1.0
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.slf4j
slf4j-api
- 1.7.11
+ 1.7.22
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.slf4j
slf4j-log4j12
- 1.7.11
+ 1.7.22
runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -87,6 +117,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -98,6 +132,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -105,6 +145,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -115,17 +159,35 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -145,14 +207,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundGatewaySample.java b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundGatewaySample.java
index 63206668..56056903 100644
--- a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundGatewaySample.java
+++ b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundGatewaySample.java
@@ -69,4 +69,4 @@ public class FtpOutboundGatewaySample {
ctx.close();
}
-}
\ No newline at end of file
+}
diff --git a/basic/ftp/src/test/resources/log4j.xml b/basic/ftp/src/test/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/basic/ftp/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/ftp/src/test/resources/log4j2.xml b/basic/ftp/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/ftp/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/helloworld/pom.xml b/basic/helloworld/pom.xml
index 720d9525..be1d3245 100644
--- a/basic/helloworld/pom.xml
+++ b/basic/helloworld/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java b/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java
index f24b03fa..1750c43f 100644
--- a/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java
+++ b/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,9 @@
package org.springframework.integration.samples.helloworld;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.messaging.MessageChannel;
@@ -36,10 +38,11 @@ import org.springframework.messaging.support.GenericMessage;
*
* @author Mark Fisher
* @author Oleg Zhurakousky
+ * @author Gary Russell
*/
public class HelloWorldApp {
- private static Logger logger = Logger.getLogger(HelloWorldApp.class);
+ private static Log logger = LogFactory.getLog(HelloWorldApp.class);
public static void main(String[] args) {
AbstractApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/helloWorldDemo.xml", HelloWorldApp.class);
@@ -47,6 +50,7 @@ public class HelloWorldApp {
PollableChannel outputChannel = context.getBean("outputChannel", PollableChannel.class);
inputChannel.send(new GenericMessage("World"));
logger.info("==> HelloWorldDemo: " + outputChannel.receive(0).getPayload());
+ context.close();
}
}
diff --git a/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/PollerApp.java b/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/PollerApp.java
index f9a38206..14097247 100644
--- a/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/PollerApp.java
+++ b/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/PollerApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@ public class PollerApp {
*
* @param args Not used.
*/
+ @SuppressWarnings("resource")
public static void main(String[] args) throws Exception{
new ClassPathXmlApplicationContext("META-INF/spring/integration/delay.xml");
}
diff --git a/basic/helloworld/src/main/resources/log4j.xml b/basic/helloworld/src/main/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/helloworld/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/helloworld/src/main/resources/log4j2.xml b/basic/helloworld/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/helloworld/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/http-boot/pom.xml b/basic/http-boot/pom.xml
deleted file mode 100644
index 0a32f119..00000000
--- a/basic/http-boot/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
- 4.0.0
- org.springframework.integration.samples
- http-boot
- 5.0.0.BUILD-SNAPSHOT
- http://projects.spring.io/spring-integration
-
- SpringIO
- https://spring.io
-
-
-
- The Apache Software License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
-
- garyrussell
- Gary Russell
- grussell@pivotal.io
-
- project lead
-
-
-
- markfisher
- Mark Fisher
- mfisher@pivotal.io
-
- project founder and lead emeritus
-
-
-
- ghillert
- Gunnar Hillert
- ghillert@pivotal.io
-
-
- abilan
- Artem Bilan
- abilan@pivotal.io
-
-
-
- scm:git:scm:git:git://github.com/spring-projects/spring-integration-samples.git
- scm:git:scm:git:ssh://git@github.com:spring-projects/spring-integration-samples.git
- https://github.com/spring-projects/spring-integration-samples
-
-
-
- junit
- junit
- 4.12
- test
-
-
- *
- org.hamcrest
-
-
-
-
- org.hamcrest
- hamcrest-all
- 1.3
- test
-
-
- org.mockito
- mockito-core
- 1.10.19
- test
-
-
- *
- org.hamcrest
-
-
-
-
- org.springframework
- spring-test
- test
-
-
-
-
- repo.spring.io.milestone
- Spring Framework Maven Milestone Repository
- https://repo.spring.io/libs-milestone
-
-
- repo.spring.io.snapshot
- Spring Framework Maven Snapshot Repository
- https://repo.spring.io/libs-snapshot
-
-
-
-
-
- org.springframework.integration
- spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
- import
- pom
-
-
- org.springframework
- spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
- import
- pom
-
-
-
-
diff --git a/basic/http/pom.xml b/basic/http/pom.xml
index afdb64fe..c05ada4a 100644
--- a/basic/http/pom.xml
+++ b/basic/http/pom.xml
@@ -56,46 +56,158 @@
org.springframework.integration
spring-integration-http
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.integration
spring-integration-mail
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-webmvc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-fileupload
commons-fileupload
1.2.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-io
commons-io
2.4
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
javax.mail
javax.mail-api
1.5.5
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
com.sun.mail
javax.mail
1.5.5
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
junit
@@ -103,6 +215,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -114,6 +230,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -121,6 +243,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -131,6 +257,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -165,14 +297,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java b/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java
index 1b15a8b2..37f223cd 100644
--- a/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java
+++ b/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-207 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.http;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -26,7 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public class HttpClientDemo {
- private static Logger logger = Logger.getLogger(HttpClientDemo.class);
+ private static Log logger = LogFactory.getLog(HttpClientDemo.class);
public static void main(String[] args) {
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext(
@@ -34,6 +35,7 @@ public class HttpClientDemo {
RequestGateway requestGateway = context.getBean("requestGateway", RequestGateway.class);
String reply = requestGateway.echo("Hello");
logger.info("\n\n++++++++++++ Replied with: " + reply + " ++++++++++++\n");
+ context.close();
}
}
diff --git a/basic/http/src/main/resources/log4j.xml b/basic/http/src/main/resources/log4j.xml
deleted file mode 100644
index f80b6531..00000000
--- a/basic/http/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/http/src/main/resources/log4j2.xml b/basic/http/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/http/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/jdbc/pom.xml b/basic/jdbc/pom.xml
index d965813f..98c7f4db 100644
--- a/basic/jdbc/pom.xml
+++ b/basic/jdbc/pom.xml
@@ -56,18 +56,36 @@
org.springframework.integration
spring-integration-jdbc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.h2database
h2
- 1.3.175
+ 1.4.194
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java b/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java
index 22cea2a4..d04cf489 100644
--- a/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java
+++ b/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,9 @@ import java.util.Date;
import java.util.List;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.jdbc.domain.Gender;
@@ -34,12 +36,13 @@ import org.springframework.integration.samples.jdbc.service.PersonService;
*
* @author Gunnar Hillert
* @author Amol Nayak
+ * @author Gary Russell
* @version 1.0
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private Main() { }
@@ -101,7 +104,7 @@ public final class Main {
LOGGER.info("Exiting application...bye.");
- System.exit(0);
+ context.close();
}
@@ -139,8 +142,9 @@ public final class Main {
System.out.println("Created person record with id: " + person.getPersonId());
System.out.print("Do you want to create another person? (y/n)");
String choice = scanner.nextLine();
- if(!"y".equalsIgnoreCase(choice))
+ if(!"y".equalsIgnoreCase(choice)) {
break;
+ }
}
}
/**
@@ -165,8 +169,9 @@ public final class Main {
}
System.out.print("Do you want to find another person? (y/n)");
String choice = scanner.nextLine();
- if(!"y".equalsIgnoreCase(choice))
+ if(!"y".equalsIgnoreCase(choice)) {
break;
+ }
}
}
diff --git a/basic/jdbc/src/main/resources/log4j.xml b/basic/jdbc/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/basic/jdbc/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/jdbc/src/main/resources/log4j2.xml b/basic/jdbc/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/jdbc/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/jdbc/src/test/java/org/springframework/integration/samples/jdbc/OutboundGatewayTest.java b/basic/jdbc/src/test/java/org/springframework/integration/samples/jdbc/OutboundGatewayTest.java
index 88062a06..797a1e4a 100644
--- a/basic/jdbc/src/test/java/org/springframework/integration/samples/jdbc/OutboundGatewayTest.java
+++ b/basic/jdbc/src/test/java/org/springframework/integration/samples/jdbc/OutboundGatewayTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,10 +17,11 @@ package org.springframework.integration.samples.jdbc;
import java.util.Calendar;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Assert;
import org.junit.Test;
-import org.springframework.context.ApplicationContext;
+
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.jdbc.domain.Gender;
import org.springframework.integration.samples.jdbc.domain.Person;
@@ -29,16 +30,17 @@ import org.springframework.integration.samples.jdbc.service.PersonService;
/**
* The test class for jdbc outbound gateway
* @author Amol Nayak
+ * @author Gary Russell
*
*/
public class OutboundGatewayTest {
- private Logger logger = Logger.getLogger(OutboundGatewayTest.class);
-
+ private final Log logger = LogFactory.getLog(OutboundGatewayTest.class);
+
@Test
- public void insertPersonRecord() {
- ApplicationContext context
- = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml");
+ public void insertPersonRecord() {
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/spring-integration-context.xml");
PersonService service = context.getBean(PersonService.class);
logger.info("Creating person Instance");
Person person = new Person();
@@ -50,6 +52,7 @@ public class OutboundGatewayTest {
person = service.createPerson(person);
Assert.assertNotNull("Expected a non null instance of Person, got null", person);
logger.info("\n\tGenerated person with id: " + person.getPersonId() + ", with name: " + person.getName());
+ context.close();
}
-
+
}
diff --git a/basic/jms/pom.xml b/basic/jms/pom.xml
index 38d5d4a6..d7f17bf1 100644
--- a/basic/jms/pom.xml
+++ b/basic/jms/pom.xml
@@ -57,22 +57,46 @@
javax.jms-api
2.0.1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-jms
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.activemq
activemq-broker
5.13.4
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.activemq
@@ -80,6 +104,10 @@
5.13.4
compile
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.springframework
@@ -87,10 +115,16 @@
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -98,6 +132,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -109,6 +147,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -116,6 +160,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -126,11 +174,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -150,14 +210,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java b/basic/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java
index 5c5ad92c..0127c1ff 100644
--- a/basic/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java
+++ b/basic/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,16 +17,18 @@ package org.springframework.integration.samples.jms;
import java.io.File;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* @author Oleg Zhurakousky
* @author Gunnar Hillert
+ * @author Gary Russell
*
*/
public class ActiveMqTestUtils {
- private static final Logger LOGGER = Logger.getLogger(ActiveMqTestUtils.class);
+ private static final Log LOGGER = LogFactory.getLog(ActiveMqTestUtils.class);
public static void prepare() {
LOGGER.info("Refreshing ActiveMQ data directory.");
@@ -45,4 +47,5 @@ public class ActiveMqTestUtils {
}
directory.delete();
}
+
}
diff --git a/basic/jms/src/main/java/org/springframework/integration/samples/jms/Main.java b/basic/jms/src/main/java/org/springframework/integration/samples/jms/Main.java
index 954f50a9..c4036b6d 100644
--- a/basic/jms/src/main/java/org/springframework/integration/samples/jms/Main.java
+++ b/basic/jms/src/main/java/org/springframework/integration/samples/jms/Main.java
@@ -98,6 +98,7 @@ public class Main {
}
System.out.println(" Please type something and hit \n");
+ scanner.close();
}
diff --git a/basic/jms/src/main/resources/META-INF/spring/integration/common.xml b/basic/jms/src/main/resources/META-INF/spring/integration/common.xml
index 287728b8..05dba2f1 100644
--- a/basic/jms/src/main/resources/META-INF/spring/integration/common.xml
+++ b/basic/jms/src/main/resources/META-INF/spring/integration/common.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/basic/jms/src/main/resources/log4j.xml b/basic/jms/src/main/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/jms/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/jms/src/main/resources/log4j2.xml b/basic/jms/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/jms/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/jmx/pom.xml b/basic/jmx/pom.xml
index af84a768..6412136b 100644
--- a/basic/jmx/pom.xml
+++ b/basic/jmx/pom.xml
@@ -56,17 +56,35 @@
org.springframework.integration
spring-integration-jmx
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -74,6 +92,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -85,6 +107,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -92,6 +120,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -102,6 +134,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -121,14 +159,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/jmx/src/test/java/org/springframework/integration/samples/jmx/JmxAdapterDemoTest.java b/basic/jmx/src/test/java/org/springframework/integration/samples/jmx/JmxAdapterDemoTest.java
index e2e8cc8a..91aff82a 100644
--- a/basic/jmx/src/test/java/org/springframework/integration/samples/jmx/JmxAdapterDemoTest.java
+++ b/basic/jmx/src/test/java/org/springframework/integration/samples/jmx/JmxAdapterDemoTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,10 +17,12 @@
package org.springframework.integration.samples.jmx;
import org.junit.Test;
+
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author Mark Fisher
+ * @author Gary Russell
* @since 2.0
*/
public class JmxAdapterDemoTest {
@@ -30,7 +32,7 @@ public class JmxAdapterDemoTest {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"/META-INF/spring/integration/JmxAdapterDemo-context.xml", JmxAdapterDemoTest.class);
Thread.sleep(20000);
- context.stop();
+ context.close();
}
}
diff --git a/basic/jmx/src/test/resources/log4j.xml b/basic/jmx/src/test/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/jmx/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/jmx/src/test/resources/log4j2.xml b/basic/jmx/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/jmx/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/jpa/pom.xml b/basic/jpa/pom.xml
index 8b3b599a..2e5e58f4 100644
--- a/basic/jpa/pom.xml
+++ b/basic/jpa/pom.xml
@@ -62,6 +62,10 @@
spring-boot-starter-data-jpa
compile
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
jboss-transaction-api_1.2_spec
org.jboss.spec.javax.transaction
@@ -73,6 +77,10 @@
spring-integration-jpa
compile
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
jboss-transaction-api_1.2_spec
org.jboss.spec.javax.transaction
@@ -82,9 +90,13 @@
com.h2database
h2
- 1.3.175
+ 1.4.194
compile
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
jboss-transaction-api_1.2_spec
org.jboss.spec.javax.transaction
@@ -96,6 +108,10 @@
spring-instrument
runtime
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
jboss-transaction-api_1.2_spec
org.jboss.spec.javax.transaction
@@ -108,6 +124,10 @@
1.0.0.Final
runtime
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
jboss-transaction-api_1.2_spec
org.jboss.spec.javax.transaction
@@ -117,9 +137,13 @@
org.eclipse.persistence
org.eclipse.persistence.jpa
- 2.6.2
+ 2.6.4
runtime
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
jboss-transaction-api_1.2_spec
org.jboss.spec.javax.transaction
@@ -132,6 +156,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -143,6 +171,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -150,6 +184,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -160,11 +198,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -192,14 +242,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/jpa/src/main/resources/logback.xml b/basic/jpa/src/main/resources/logback.xml
new file mode 100644
index 00000000..8c6ebb38
--- /dev/null
+++ b/basic/jpa/src/main/resources/logback.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/kafka/pom.xml b/basic/kafka/pom.xml
index 3a90f6ed..c2fefec5 100644
--- a/basic/kafka/pom.xml
+++ b/basic/kafka/pom.xml
@@ -61,35 +61,63 @@
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-kafka
- 3.0.0.BUILD-SNAPSHOT
+ 3.0.0.M1
compile
*
org.slf4j
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.kafka
spring-kafka
- 2.0.0.BUILD-SNAPSHOT
+ 2.0.0.M3
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -97,6 +125,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -108,6 +140,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -115,6 +153,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -125,11 +167,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -157,14 +211,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/mail/pom.xml b/basic/mail/pom.xml
index fa5bd845..bb5a82fb 100644
--- a/basic/mail/pom.xml
+++ b/basic/mail/pom.xml
@@ -56,29 +56,59 @@
org.springframework.integration
spring-integration-mail
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework
spring-context
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
javax.mail
javax.mail-api
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.sun.mail
javax.mail
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -86,6 +116,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +131,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -104,6 +144,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -114,6 +158,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -133,14 +183,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java
index f800021c..dadcfa23 100644
--- a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java
+++ b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,26 +15,31 @@
*/
package org.springframework.integration.samples.mail.imapidle;
-import org.apache.log4j.Logger;
-import org.springframework.context.ApplicationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessagingException;
import org.springframework.integration.channel.DirectChannel;
+import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
+import org.springframework.messaging.MessagingException;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class GmailInboundImapIdleAdapterTestApp {
- private static Logger logger = Logger.getLogger(GmailInboundImapIdleAdapterTestApp.class);
+ private static Log logger = LogFactory.getLog(GmailInboundImapIdleAdapterTestApp.class);
public static void main (String[] args) throws Exception {
- ApplicationContext ac = new ClassPathXmlApplicationContext("/META-INF/spring/integration/gmail-imap-idle-config.xml");
+ @SuppressWarnings("resource")
+ ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/gmail-imap-idle-config.xml");
DirectChannel inputChannel = ac.getBean("receiveChannel", DirectChannel.class);
inputChannel.subscribe(new MessageHandler() {
+ @Override
public void handleMessage(Message> message) throws MessagingException {
logger.info("Message: " + message);
}
diff --git a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java
index 2047a2f8..77f977db 100644
--- a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java
+++ b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,26 +15,31 @@
*/
package org.springframework.integration.samples.mail.imapidle;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessagingException;
import org.springframework.integration.channel.DirectChannel;
+import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
+import org.springframework.messaging.MessagingException;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class GmailInboundPop3AdapterTestApp {
- private static Logger logger = Logger.getLogger(GmailInboundPop3AdapterTestApp.class);
+ private static Log logger = LogFactory.getLog(GmailInboundPop3AdapterTestApp.class);
public static void main (String[] args) throws Exception {
+ @SuppressWarnings("resource")
ApplicationContext ac = new ClassPathXmlApplicationContext("/META-INF/spring/integration/gmail-pop3-config.xml");
DirectChannel inputChannel = ac.getBean("receiveChannel", DirectChannel.class);
inputChannel.subscribe(new MessageHandler() {
+ @Override
public void handleMessage(Message> message) throws MessagingException {
logger.info("Message: " + message);
}
diff --git a/basic/mail/src/main/resources/log4j.xml b/basic/mail/src/main/resources/log4j.xml
deleted file mode 100644
index 364cd818..00000000
--- a/basic/mail/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/mail/src/main/resources/log4j2.xml b/basic/mail/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/mail/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/mongodb/pom.xml b/basic/mongodb/pom.xml
index b5cf1d8d..4780fbc0 100644
--- a/basic/mongodb/pom.xml
+++ b/basic/mongodb/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-mongodb
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/inbound/MongoDbInboundAdapterDemo.java b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/inbound/MongoDbInboundAdapterDemo.java
index 287a5eda..9af84b2e 100644
--- a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/inbound/MongoDbInboundAdapterDemo.java
+++ b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/inbound/MongoDbInboundAdapterDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ import org.springframework.integration.samples.mongodb.util.DemoUtils;
/**
*
* @author Oleg Zhurakousky
+ * @author Gary Russell
*/
public class MongoDbInboundAdapterDemo {
@@ -41,6 +42,6 @@ public class MongoDbInboundAdapterDemo {
new ClassPathXmlApplicationContext("mongodb-in-config.xml", MongoDbInboundAdapterDemo.class);
Thread.sleep(3000);
- context.stop();
+ context.close();
}
}
diff --git a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java
index 1f1c13ed..0264e2af 100644
--- a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java
+++ b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,14 +16,15 @@
package org.springframework.integration.samples.mongodb.outbound;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.messaging.support.GenericMessage;
import org.springframework.integration.samples.mongodb.domain.Address;
import org.springframework.integration.samples.mongodb.domain.Person;
import org.springframework.integration.samples.mongodb.util.DemoUtils;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.support.GenericMessage;
/**
*
* @author Oleg Zhurakousky
+* @author Gary Russell
*/
public class MongoDbOutboundAdapterDemo {
@@ -38,6 +39,7 @@ public class MongoDbOutboundAdapterDemo {
public void runDefaultAdapter() throws Exception {
+ @SuppressWarnings("resource")
ClassPathXmlApplicationContext context =
new ClassPathXmlApplicationContext("mongodb-out-config.xml", MongoDbOutboundAdapterDemo.class);
@@ -49,6 +51,7 @@ public class MongoDbOutboundAdapterDemo {
public void runAdapterWithConveter() throws Exception {
+ @SuppressWarnings("resource")
ClassPathXmlApplicationContext context =
new ClassPathXmlApplicationContext("mongodb-out-config.xml", MongoDbOutboundAdapterDemo.class);
diff --git a/basic/mongodb/src/main/resources/log4j.xml b/basic/mongodb/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/basic/mongodb/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/mongodb/src/main/resources/log4j2.xml b/basic/mongodb/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/mongodb/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/mqtt/pom.xml b/basic/mqtt/pom.xml
index 6a322258..4c013817 100644
--- a/basic/mqtt/pom.xml
+++ b/basic/mqtt/pom.xml
@@ -61,16 +61,34 @@
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-mqtt
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -78,6 +96,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -89,6 +111,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -96,6 +124,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -106,6 +138,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -133,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/mqtt/src/main/java/org/springframework/integration/samples/mqtt/Application.java b/basic/mqtt/src/main/java/org/springframework/integration/samples/mqtt/Application.java
index de3e01ae..a80ae773 100644
--- a/basic/mqtt/src/main/java/org/springframework/integration/samples/mqtt/Application.java
+++ b/basic/mqtt/src/main/java/org/springframework/integration/samples/mqtt/Application.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 the original author or authors.
+ * Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.mqtt;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -42,7 +43,7 @@ import org.springframework.messaging.MessageHandler;
@SpringBootApplication
public class Application {
- private static final Logger LOGGER = Logger.getLogger(Application.class);
+ private static final Log LOGGER = LogFactory.getLog(Application.class);
/**
* Load the Spring Integration Application Context
diff --git a/basic/oddeven/pom.xml b/basic/oddeven/pom.xml
index 32282942..e2a6e2e3 100644
--- a/basic/oddeven/pom.xml
+++ b/basic/oddeven/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java b/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java
index bae0f372..88ed91cb 100644
--- a/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java
+++ b/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@ package org.springframework.integration.samples.oddeven;
import java.text.SimpleDateFormat;
import java.util.Date;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.annotation.ServiceActivator;
@@ -28,10 +30,11 @@ import org.springframework.integration.annotation.ServiceActivator;
*
* @author Mark Fisher
* @author Marius Bogoevici
+ * @author Gary Russell
*/
@MessageEndpoint
public class EvenLogger {
- private static Logger logger = Logger.getLogger(EvenLogger.class);
+ private static Log logger = LogFactory.getLog(EvenLogger.class);
@ServiceActivator
public void log(int i) {
diff --git a/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java b/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java
index ac422254..405b3eef 100644
--- a/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java
+++ b/basic/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@ package org.springframework.integration.samples.oddeven;
import java.text.SimpleDateFormat;
import java.util.Date;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.annotation.ServiceActivator;
@@ -28,14 +30,15 @@ import org.springframework.integration.annotation.ServiceActivator;
*
* @author Mark Fisher
* @author Marius Bogoevici
+ * @author Gary Russell
*/
@MessageEndpoint
public class OddLogger {
- private static Logger logger = Logger.getLogger(OddLogger.class);
+ private static Log logger = LogFactory.getLog(OddLogger.class);
@ServiceActivator
public void log(int i) {
logger.info("odd: " + i + " at " + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()));
}
-}
\ No newline at end of file
+}
diff --git a/basic/oddeven/src/main/resources/log4j.xml b/basic/oddeven/src/main/resources/log4j.xml
deleted file mode 100644
index bfeed04a..00000000
--- a/basic/oddeven/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/oddeven/src/main/resources/log4j2.xml b/basic/oddeven/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/oddeven/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/quote/pom.xml b/basic/quote/pom.xml
index 9d638c21..0ee2c16f 100644
--- a/basic/quote/pom.xml
+++ b/basic/quote/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/quote/src/test/resources/log4j.xml b/basic/quote/src/test/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/quote/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/quote/src/test/resources/log4j2.xml b/basic/quote/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/quote/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/sftp/pom.xml b/basic/sftp/pom.xml
index b512ea0d..41d5d515 100644
--- a/basic/sftp/pom.xml
+++ b/basic/sftp/pom.xml
@@ -56,18 +56,36 @@
org.springframework.integration
spring-integration-sftp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.sshd
sshd-core
1.4.0
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/sftp/src/test/resources/log4j.xml b/basic/sftp/src/test/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/basic/sftp/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/sftp/src/test/resources/log4j2.xml b/basic/sftp/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/sftp/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/splunk/pom.xml b/basic/splunk/pom.xml
index 1901a2f7..a5488c23 100644
--- a/basic/splunk/pom.xml
+++ b/basic/splunk/pom.xml
@@ -61,17 +61,35 @@
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-splunk
1.1.0.RELEASE
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -79,6 +97,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -90,6 +112,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -97,6 +125,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -107,11 +139,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -139,14 +183,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/tcp-amqp/pom.xml b/basic/tcp-amqp/pom.xml
index 63d60ac2..abf3f66b 100644
--- a/basic/tcp-amqp/pom.xml
+++ b/basic/tcp-amqp/pom.xml
@@ -56,29 +56,59 @@
org.springframework.integration
spring-integration-amqp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ip
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.slf4j
slf4j-api
- 1.7.11
+ 1.7.22
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.slf4j
slf4j-log4j12
- 1.7.11
+ 1.7.22
runtime
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -86,6 +116,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +131,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -104,6 +144,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -114,6 +158,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -133,14 +183,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/tcp-amqp/src/main/resources/log4j.xml b/basic/tcp-amqp/src/main/resources/log4j.xml
deleted file mode 100644
index a14f0d8f..00000000
--- a/basic/tcp-amqp/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/tcp-amqp/src/main/resources/log4j2.xml b/basic/tcp-amqp/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/tcp-amqp/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/tcp-client-server/pom.xml b/basic/tcp-client-server/pom.xml
index d2ba8bd7..f00167b3 100644
--- a/basic/tcp-client-server/pom.xml
+++ b/basic/tcp-client-server/pom.xml
@@ -56,23 +56,47 @@
org.springframework.integration
spring-integration-ip
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
commons-lang
commons-lang
2.6
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -80,6 +104,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -91,6 +119,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -98,6 +132,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -108,6 +146,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -127,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/EchoService.java b/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/EchoService.java
index d63e1810..150b23f7 100644
--- a/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/EchoService.java
+++ b/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/EchoService.java
@@ -31,4 +31,4 @@ public class EchoService {
return "echo:" + input;
}
-}
\ No newline at end of file
+}
diff --git a/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java b/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java
index c6c7dcc4..af4ea692 100644
--- a/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java
+++ b/basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java
@@ -23,4 +23,4 @@ public interface SimpleGateway {
public String send(String text);
-}
\ No newline at end of file
+}
diff --git a/basic/tcp-client-server/src/main/resources/log4j.xml b/basic/tcp-client-server/src/main/resources/log4j.xml
deleted file mode 100644
index 0368cdf8..00000000
--- a/basic/tcp-client-server/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/tcp-client-server/src/main/resources/log4j2.xml b/basic/tcp-client-server/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/tcp-client-server/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java
index b93039d9..fdb43970 100644
--- a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java
+++ b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,20 +26,22 @@ import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.Socket;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.messaging.SubscribableChannel;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
import org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory;
import org.springframework.integration.ip.util.TestingUtilities;
import org.springframework.integration.samples.tcpclientserver.support.CustomTestContextLoader;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.SubscribableChannel;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -52,15 +54,16 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*
* @author Christian Posta
* @author Gunnar Hillert
+ * @author Gary Russell
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(loader=CustomTestContextLoader.class,
- locations = {"/META-INF/spring/integration/tcpServerCustomSerialize-context.xml"})
+@ContextConfiguration(loader = CustomTestContextLoader.class, locations = {
+ "/META-INF/spring/integration/tcpServerCustomSerialize-context.xml" })
@DirtiesContext
public class TcpServerCustomSerializerTest {
- private static final Logger LOGGER = Logger.getLogger(TcpServerCustomSerializerTest.class);
+ private static final Log LOGGER = LogFactory.getLog(TcpServerCustomSerializerTest.class);
@Autowired
@Qualifier("incomingServerChannel")
@@ -84,7 +87,7 @@ public class TcpServerCustomSerializerTest {
// the reason we use a listener here is so we can assert truths on the
// message and/or payload
SubscribableChannel channel = (SubscribableChannel) incomingServerChannel;
- channel.subscribe(new AbstractReplyProducingMessageHandler(){
+ channel.subscribe(new AbstractReplyProducingMessageHandler() {
@Override
protected Object handleRequestMessage(Message> requestMessage) {
@@ -124,16 +127,19 @@ public class TcpServerCustomSerializerTest {
String response = str.toString();
assertEquals(sourceMessage, response);
- } catch (IOException e) {
+ }
+ catch (IOException e) {
LOGGER.error(e.getMessage(), e);
fail(String.format("Test (port: %s) ended with an exception: %s", availableServerSocket, e.getMessage()));
- } finally {
+ }
+ finally {
try {
socket.close();
out.close();
in.close();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
// swallow exception
}
diff --git a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java
index d5e3bd1f..fd989682 100644
--- a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java
+++ b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@ package org.springframework.integration.samples.tcpclientserver.support;
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.env.MapPropertySource;
import org.springframework.integration.test.util.SocketUtils;
@@ -27,10 +29,11 @@ import org.springframework.test.context.support.GenericXmlContextLoader;
/**
* @author Gunnar Hillert
+ * @author Gary Russell
*/
public class CustomTestContextLoader extends GenericXmlContextLoader {
- private static final Logger LOGGER = Logger.getLogger(CustomTestContextLoader.class);
+ private static final Log LOGGER = LogFactory.getLog(CustomTestContextLoader.class);
@Override
protected void loadBeanDefinitions(GenericApplicationContext context,
diff --git a/basic/testing-examples/pom.xml b/basic/testing-examples/pom.xml
index d11a3edb..18b8f49f 100644
--- a/basic/testing-examples/pom.xml
+++ b/basic/testing-examples/pom.xml
@@ -56,27 +56,57 @@
org.springframework.integration
spring-integration-file
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-http
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ws
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework
spring-webmvc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -84,6 +114,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -95,6 +129,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -102,6 +142,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -112,11 +156,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -136,14 +192,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/testing-examples/src/main/resources/log4j.xml b/basic/testing-examples/src/main/resources/log4j.xml
deleted file mode 100644
index 5ce38316..00000000
--- a/basic/testing-examples/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/testing-examples/src/main/resources/log4j2.xml b/basic/testing-examples/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/testing-examples/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/twitter/pom.xml b/basic/twitter/pom.xml
index db5dc40f..f32f8c75 100644
--- a/basic/twitter/pom.xml
+++ b/basic/twitter/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-twitter
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/twitter/src/test/resources/log4j.xml b/basic/twitter/src/test/resources/log4j.xml
deleted file mode 100644
index c80a153b..00000000
--- a/basic/twitter/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/twitter/src/test/resources/log4j2.xml b/basic/twitter/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/basic/twitter/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/web-sockets/pom.xml b/basic/web-sockets/pom.xml
index 0155582b..8dac35bf 100644
--- a/basic/web-sockets/pom.xml
+++ b/basic/web-sockets/pom.xml
@@ -61,11 +61,23 @@
org.springframework.boot
spring-boot-starter-websocket
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-websocket
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -73,6 +85,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -84,6 +100,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -91,6 +113,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -101,11 +127,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -133,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/web-sockets/src/main/resources/logback.xml b/basic/web-sockets/src/main/resources/logback.xml
new file mode 100644
index 00000000..8c6ebb38
--- /dev/null
+++ b/basic/web-sockets/src/main/resources/logback.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/ws-inbound-gateway/pom.xml b/basic/ws-inbound-gateway/pom.xml
index 50a7050d..8b2fa15f 100644
--- a/basic/ws-inbound-gateway/pom.xml
+++ b/basic/ws-inbound-gateway/pom.xml
@@ -56,22 +56,78 @@
org.springframework.integration
spring-integration-xml
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.integration
spring-integration-ws
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-webmvc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
junit
@@ -79,6 +135,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -90,6 +150,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -97,6 +163,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -107,6 +177,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -141,14 +217,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java b/basic/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java
index 3fcb01b6..4bddfc8e 100644
--- a/basic/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java
+++ b/basic/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,8 @@ import static org.junit.Assert.assertThat;
import javax.xml.transform.Source;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.springframework.ws.client.core.WebServiceTemplate;
@@ -36,10 +37,11 @@ import org.springframework.xml.transform.StringSource;
* attempting to run this test.
*
* @author Chris Beams
+ * @author Gary Russell
*/
public class InContainerTests {
- private static Logger logger = Logger.getLogger(InContainerTests.class);
+ private static Log logger = LogFactory.getLog(InContainerTests.class);
private static final String WS_URI = "http://localhost:8080/ws-inbound-gateway/echoservice";
private final WebServiceTemplate template = new WebServiceTemplate();
diff --git a/basic/ws-inbound-gateway/src/test/resources/log4j.xml b/basic/ws-inbound-gateway/src/test/resources/log4j.xml
deleted file mode 100644
index bcad1560..00000000
--- a/basic/ws-inbound-gateway/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/ws-inbound-gateway/src/test/resources/log4j2.xml b/basic/ws-inbound-gateway/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..8b188ec3
--- /dev/null
+++ b/basic/ws-inbound-gateway/src/test/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/ws-outbound-gateway/pom.xml b/basic/ws-outbound-gateway/pom.xml
index ba6bc3ae..509dba31 100644
--- a/basic/ws-outbound-gateway/pom.xml
+++ b/basic/ws-outbound-gateway/pom.xml
@@ -56,17 +56,35 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ws
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -74,6 +92,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -85,6 +107,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -92,6 +120,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -102,6 +134,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -121,14 +159,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/ws-outbound-gateway/src/main/resources/log4j.xml b/basic/ws-outbound-gateway/src/main/resources/log4j.xml
deleted file mode 100644
index 17df6e28..00000000
--- a/basic/ws-outbound-gateway/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/ws-outbound-gateway/src/main/resources/log4j2.xml b/basic/ws-outbound-gateway/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..1e8b2415
--- /dev/null
+++ b/basic/ws-outbound-gateway/src/main/resources/log4j2.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/xml/pom.xml b/basic/xml/pom.xml
index a2b9d8f1..fc97b777 100644
--- a/basic/xml/pom.xml
+++ b/basic/xml/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-xml
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java b/basic/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java
index 59cccfd8..1b956bfe 100644
--- a/basic/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java
+++ b/basic/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,14 +16,16 @@
package org.springframework.integration.samples.xml;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
/**
- *
+ *
* @author Jonas Partner
+ * @author Gary Russell
*/
public class ExternalResupply {
- private static Logger logger = Logger.getLogger(ExternalResupply.class);
+ private static Log logger = LogFactory.getLog(ExternalResupply.class);
public void orderResupply(Document resupplyOrder) {
logger.info("Placing resupply order: \n" + XmlUtil.docAsString(resupplyOrder));
diff --git a/basic/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java b/basic/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java
index dc5a8b83..008522c5 100644
--- a/basic/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java
+++ b/basic/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,17 @@
package org.springframework.integration.samples.xml;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
/**
- *
+ *
* @author Jonas Partner
+ * @author Gary Russell
*/
public class WarehouseDispatch {
- private static Logger logger = Logger.getLogger(WarehouseDispatch.class);
-
+ private static Log logger = LogFactory.getLog(WarehouseDispatch.class);
+
public void dispatch(Document orderItem){
logger.info("Warehouse dispatching orderItem: \n" + XmlUtil.docAsString(orderItem));
}
diff --git a/basic/xml/src/main/resources/log4j.xml b/basic/xml/src/main/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/xml/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/xml/src/main/resources/log4j2.xml b/basic/xml/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..8b188ec3
--- /dev/null
+++ b/basic/xml/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/xmpp/pom.xml b/basic/xmpp/pom.xml
index 28fa879e..6bf95a85 100644
--- a/basic/xmpp/pom.xml
+++ b/basic/xmpp/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-xmpp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/basic/xmpp/src/test/resources/log4j.xml b/basic/xmpp/src/test/resources/log4j.xml
deleted file mode 100644
index c80a153b..00000000
--- a/basic/xmpp/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/xmpp/src/test/resources/log4j2.xml b/basic/xmpp/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..8b188ec3
--- /dev/null
+++ b/basic/xmpp/src/test/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.gradle b/build.gradle
index f3d5ba80..d2aa5f36 100644
--- a/build.gradle
+++ b/build.gradle
@@ -204,7 +204,7 @@ subprojects { subproject ->
jstlVersion = '1.2'
junitVersion = '4.12'
jythonVersion = '2.5.3'
- log4jVersion = '1.2.17'
+ log4jVersion = '2.7'
mockitoVersion = '1.10.19'
openJpaVersion = '2.4.0'
oracleDriverVersion = '11.2.0.3'
@@ -274,7 +274,7 @@ subprojects { subproject ->
doLast {
def configFiles = []
sourceSets.test.allSource.srcDirs.each {
- fileTree(it).include('**/*.xml').exclude('**/log4j.xml').each { configFile ->
+ fileTree(it).include('**/*.xml').exclude('**/log4j2.xml').each { configFile ->
def configXml = new XmlParser(false, false).parse(configFile)
if (configXml.@'xsi:schemaLocation' ==~ /.*spring-[a-z-]*\d\.\d\.xsd.*/) {
@@ -309,7 +309,7 @@ project('advanced-testing-examples') {
compile "javax.jms:javax.jms-api:$jmsApiVersion"
compile "org.springframework.integration:spring-integration-jms"
compile "org.springframework.integration:spring-integration-groovy"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -318,7 +318,7 @@ project('dynamic-ftp') {
dependencies {
compile "org.springframework.integration:spring-integration-ftp"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -332,7 +332,7 @@ project('cafe-si') {
dependencies {
compile "org.springframework.integration:spring-integration-stream"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -342,7 +342,7 @@ project('cafe-amqp') {
dependencies {
compile project(":cafe-si")
compile "org.springframework.integration:spring-integration-amqp"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -357,7 +357,7 @@ project('cafe-jms') {
}
compile "org.springframework.integration:spring-integration-jms"
compile "javax.jms:javax.jms-api:$jmsApiVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -372,7 +372,7 @@ project('cafe-scripted') {
compile "org.jruby:jruby:$jrubyVersion"
compile "org.python:jython-standalone:$jythonVersion"
compile "org.codehaus.groovy:groovy-all:$groovyVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runCafeDemoApp(type: JavaExec) {
@@ -396,7 +396,7 @@ project('loan-broker') {
dependencies {
compile "org.springframework.integration:spring-integration-ip"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runLoanBrokerSharkDetectorDemo(type: JavaExec) {
@@ -438,7 +438,7 @@ project('loanshark') {
compile "org.springframework.webflow:spring-js:$springWebFlowVersion"
compile "org.slf4j:slf4j-api:$slf4jVersion"
- runtime "log4j:log4j:$log4jVersion"
+ runtime "org.apache.logging.log4j:log4j-core:$log4jVersion"
runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
runtime "org.slf4j:jcl-over-slf4j:$slf4jVersion"
}
@@ -451,7 +451,8 @@ project('amqp') {
dependencies {
compile "org.springframework.integration:spring-integration-stream"
compile "org.springframework.integration:spring-integration-amqp"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
+ runtime "org.slf4j:slf4j-jcl:$slf4jVersion"
}
task runSimple(type: JavaExec) {
@@ -504,7 +505,7 @@ project('control-bus') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -518,7 +519,7 @@ project('enricher') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
compile "com.h2database:h2:$h2Version"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -527,7 +528,7 @@ project('feed') {
dependencies {
compile "org.springframework.integration:spring-integration-feed"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -536,7 +537,7 @@ project('file') {
dependencies {
compile "org.springframework.integration:spring-integration-file"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -551,7 +552,7 @@ project('ftp') {
runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
- testCompile "log4j:log4j:$log4jVersion"
+ testCompile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test"
}
@@ -565,7 +566,7 @@ project('helloworld') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runHelloWorldApp(type: JavaExec) {
@@ -597,7 +598,7 @@ project('http') {
compile "commons-io:commons-io:$commonsIoVersion"
compile "javax.mail:javax.mail-api:$javaxMailVersion"
compile "com.sun.mail:javax.mail:$javaxMailVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -637,7 +638,7 @@ project('kafka') {
compile "org.springframework.integration:spring-integration-core"
compile "org.springframework.kafka:spring-kafka:$springKafkaVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
@@ -744,7 +745,7 @@ project('jdbc') {
dependencies {
compile "org.springframework.integration:spring-integration-jdbc"
compile "com.h2database:h2:$h2Version"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -763,7 +764,7 @@ project('jms') {
compile("org.apache.activemq:activemq-kahadb-store:$activeMqVersion") {
exclude group: "org.springframework"
}
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test"
}
@@ -775,7 +776,7 @@ project('jmx') {
dependencies {
compile "org.springframework.integration:spring-integration-jmx"
compile "org.springframework.integration:spring-integration-stream"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -822,7 +823,7 @@ project('mail') {
compile "org.springframework:spring-context"
compile "javax.mail:javax.mail-api:$javaxMailVersion"
compile "com.sun.mail:javax.mail:$javaxMailVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runGmailInboundPop3AdapterTestApp(type: JavaExec) {
@@ -841,7 +842,7 @@ project('mongodb') {
dependencies {
compile "org.springframework.integration:spring-integration-mongodb"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runMongoDbInboundAdapterDemo(type: JavaExec) {
@@ -860,7 +861,7 @@ project('oddeven') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runCronOddEvenDemo(type: JavaExec) {
@@ -879,7 +880,7 @@ project('quote') {
dependencies {
compile "org.springframework.integration:spring-integration-stream"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -889,7 +890,7 @@ project('sftp') {
dependencies {
compile "org.springframework.integration:spring-integration-sftp"
compile "org.apache.sshd:sshd-core:$apacheSshdVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -905,7 +906,7 @@ project('tcp-amqp') {
compile "org.springframework.integration:spring-integration-ip"
compile "org.slf4j:slf4j-api:$slf4jVersion"
- runtime "log4j:log4j:$log4jVersion"
+ runtime "org.apache.logging.log4j:log4j-core:$log4jVersion"
runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
}
}
@@ -921,7 +922,7 @@ project('tcp-client-server') {
compile "org.springframework.integration:spring-integration-ip"
compile "commons-lang:commons-lang:$commonsLangVersion"
compile "org.springframework.integration:spring-integration-test"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -937,7 +938,7 @@ project('testing-examples') {
compile "org.springframework.integration:spring-integration-http"
compile "org.springframework.integration:spring-integration-ws"
compile "org.springframework:spring-webmvc"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test"
}
@@ -948,7 +949,7 @@ project('twitter') {
dependencies {
compile "org.springframework.integration:spring-integration-twitter"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
test {
@@ -966,7 +967,7 @@ project('ws-inbound-gateway') {
compile "org.springframework.integration:spring-integration-xml"
compile "org.springframework.integration:spring-integration-ws"
compile "org.springframework:spring-webmvc"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
test {
@@ -985,7 +986,7 @@ project('ws-outbound-gateway') {
compile "org.springframework.integration:spring-integration-stream"
compile "org.springframework.integration:spring-integration-ws"
// compile 'com.sun.xml.messaging.saaj:saaj-impl:1.3.19'
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -998,7 +999,7 @@ project('xml') {
dependencies {
compile "org.springframework.integration:spring-integration-xml"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1007,7 +1008,7 @@ project('xmpp') {
dependencies {
compile "org.springframework.integration:spring-integration-xmpp"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
test {
@@ -1020,7 +1021,7 @@ project('async-gateway') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1033,7 +1034,7 @@ project('dynamic-poller') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1042,7 +1043,7 @@ project('errorhandling') {
dependencies {
compile "org.springframework.integration:spring-integration-stream"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1051,7 +1052,7 @@ project('file-processing') {
dependencies {
compile "org.springframework.integration:spring-integration-file"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1068,7 +1069,7 @@ project('mail-attachments') {
compile "javax.mail:javax.mail-api:$javaxMailVersion"
compile "com.sun.mail:javax.mail:$javaxMailVersion"
compile "commons-io:commons-io:$commonsIoVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test"
testCompile "org.subethamail:subethasmtp-wiser:$subethasmtpVersion"
@@ -1091,7 +1092,7 @@ project('monitoring') {
compile "org.springframework.integration:spring-integration-groovy"
compile "org.springframework:spring-webmvc"
compile "javax.servlet:jstl:$jstlVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1107,7 +1108,7 @@ project('multipart-http') {
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "commons-fileupload:commons-fileupload:$commonsFileUploadVersion"
compile "commons-io:commons-io:$commonsIoVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1129,7 +1130,7 @@ project('rest-http') {
compile "org.springframework.security:spring-security-web:$springSecurityVersion"
compile "org.springframework.security:spring-security-config:$springSecurityVersion"
compile "org.jasypt:jasypt:$jasyptVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
test {
@@ -1150,7 +1151,7 @@ project('retry-and-more') {
exclude group: 'org.hamcrest'
}
compile "org.hamcrest:hamcrest-all:$hamcrestVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
task runCircuitBreakerDemo(type: JavaExec) {
@@ -1189,7 +1190,7 @@ project('splitter-aggregator-reaper') {
dependencies {
compile "org.springframework.integration:spring-integration-core"
compile "javax.inject:javax.inject:$javaxInjectVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1204,7 +1205,7 @@ project('stored-procedures-derby') {
dependencies {
compile "org.springframework.integration:spring-integration-jdbc"
compile "org.apache.derby:derby:$derbyVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1223,7 +1224,7 @@ project('stored-procedures-oracle') {
compile "org.springframework.integration:spring-integration-jdbc"
//TODO Uncomment it when the ojdbc6 artifact is available in the mavenLocal()
// compile "com.oracle:ojdbc6:$oracleDriverVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
test {
@@ -1242,7 +1243,7 @@ project('stored-procedures-ms') {
compile "org.springframework.integration:spring-integration-jdbc"
compile "net.sourceforge.jtds:jtds:$jtdsVersion"
compile "c3p0:c3p0:$c3p0Version"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
test {
@@ -1262,7 +1263,7 @@ project('stored-procedures-postgresql') {
compile "org.postgresql:postgresql:$postgresVersion"
compile "commons-dbcp:commons-dbcp:$commonsDbcpVersion"
compile "commons-pool:commons-pool:$commonsPoolVersion"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1271,7 +1272,7 @@ project('tcp-client-server-multiplex') {
dependencies {
compile "org.springframework.integration:spring-integration-ip"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile "org.springframework.integration:spring-integration-test"
}
@@ -1288,7 +1289,7 @@ project('travel') {
compile "org.springframework.integration:spring-integration-ws"
compile "org.springframework.integration:spring-integration-http"
compile "org.springframework:spring-web"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1303,7 +1304,7 @@ project('tx-synch') {
compile "org.springframework.integration:spring-integration-jdbc"
compile "org.springframework.integration:spring-integration-file"
compile "com.h2database:h2:$h2Version"
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
}
}
@@ -1360,7 +1361,7 @@ project('kafka-dsl') {
compile 'org.springframework.boot:spring-boot-starter-integration'
compile "org.springframework.integration:spring-integration-core"
compile ("org.springframework.integration:spring-integration-kafka:$springIntegrationKafkaVersion")
- compile "log4j:log4j:$log4jVersion"
+ compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
bootRun {
diff --git a/dsl/cafe-dsl/pom.xml b/dsl/cafe-dsl/pom.xml
index 85ebd14d..860b6c8b 100644
--- a/dsl/cafe-dsl/pom.xml
+++ b/dsl/cafe-dsl/pom.xml
@@ -62,22 +62,46 @@
cafe-si
5.0.0.BUILD-SNAPSHOT
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.google.guava
guava
16.0.1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -85,6 +109,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -96,6 +124,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -103,6 +137,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -113,11 +151,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -145,14 +195,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/dsl/cafe-dsl/src/main/resources/logback.xml b/dsl/cafe-dsl/src/main/resources/logback.xml
new file mode 100644
index 00000000..8c6ebb38
--- /dev/null
+++ b/dsl/cafe-dsl/src/main/resources/logback.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dsl/kafka-dsl/pom.xml b/dsl/kafka-dsl/pom.xml
index ab48638c..b86bbe4d 100644
--- a/dsl/kafka-dsl/pom.xml
+++ b/dsl/kafka-dsl/pom.xml
@@ -61,23 +61,47 @@
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-kafka
- 3.0.0.BUILD-SNAPSHOT
+ 3.0.0.M1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -85,6 +109,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -96,6 +124,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -103,6 +137,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -113,11 +151,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -145,14 +195,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/dsl/pom.xml b/dsl/pom.xml
index daa8391e..1b7a4dd3 100644
--- a/dsl/pom.xml
+++ b/dsl/pom.xml
@@ -56,6 +56,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -67,6 +71,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -74,6 +84,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -84,6 +98,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -103,14 +123,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/dsl/si4demo/pom.xml b/dsl/si4demo/pom.xml
index 2a5cb689..50ac539d 100644
--- a/dsl/si4demo/pom.xml
+++ b/dsl/si4demo/pom.xml
@@ -61,49 +61,103 @@
org.springframework.boot
spring-boot-starter-web
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-integration
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-mail
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-twitter
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-http
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ip
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
javax.mail
javax.mail-api
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.sun.mail
javax.mail
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.rometools
rome
1.5.0
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -111,6 +165,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -122,6 +180,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -129,6 +193,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -139,11 +207,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.boot
spring-boot-starter-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -171,14 +251,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/async-gateway/pom.xml b/intermediate/async-gateway/pom.xml
index 66b2c6df..ff7b5e6c 100644
--- a/intermediate/async-gateway/pom.xml
+++ b/intermediate/async-gateway/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/AsyncGatewayTest.java b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/AsyncGatewayTest.java
index 43cb9e4f..1367c44e 100644
--- a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/AsyncGatewayTest.java
+++ b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/AsyncGatewayTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,8 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.springframework.context.ConfigurableApplicationContext;
@@ -36,7 +37,7 @@ import org.springframework.context.support.FileSystemXmlApplicationContext;
*
*/
public class AsyncGatewayTest {
- private static Logger logger = Logger.getLogger(AsyncGatewayTest.class);
+ private static Log logger = LogFactory.getLog(AsyncGatewayTest.class);
private static ExecutorService executor = Executors.newFixedThreadPool(100);
private static int timeout = 20;
diff --git a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java
index f5727c8b..7b4809ad 100644
--- a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java
+++ b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,8 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -58,7 +59,7 @@ import org.springframework.util.concurrent.ListenableFutureCallback;
@DirtiesContext
public class ListenableFutureTest {
- private static Logger logger = Logger.getLogger(ListenableFutureTest.class);
+ private static Log logger = LogFactory.getLog(ListenableFutureTest.class);
@Autowired
private MathGateway gateway;
diff --git a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/MonoTest.java b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/MonoTest.java
index fc89d6ce..4fdeda82 100644
--- a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/MonoTest.java
+++ b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/MonoTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package org.springframework.integration.samples.async.gateway;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
@@ -26,7 +25,8 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -58,7 +58,7 @@ import reactor.core.scheduler.Schedulers;
@DirtiesContext
public class MonoTest {
- private static Logger logger = Logger.getLogger(MonoTest.class);
+ private static Log logger = LogFactory.getLog(MonoTest.class);
@Autowired
private MathGateway gateway;
diff --git a/intermediate/async-gateway/src/test/resources/log4j.xml b/intermediate/async-gateway/src/test/resources/log4j.xml
deleted file mode 100644
index 97d2f11e..00000000
--- a/intermediate/async-gateway/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/async-gateway/src/test/resources/log4j2.xml b/intermediate/async-gateway/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/async-gateway/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/dynamic-poller/pom.xml b/intermediate/dynamic-poller/pom.xml
index c0f2e863..6770f3cd 100644
--- a/intermediate/dynamic-poller/pom.xml
+++ b/intermediate/dynamic-poller/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/dynamic-poller/src/main/java/org/springframework/integration/samples/poller/Main.java b/intermediate/dynamic-poller/src/main/java/org/springframework/integration/samples/poller/Main.java
index 187980b7..6f45e8a4 100644
--- a/intermediate/dynamic-poller/src/main/java/org/springframework/integration/samples/poller/Main.java
+++ b/intermediate/dynamic-poller/src/main/java/org/springframework/integration/samples/poller/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,9 @@ package org.springframework.integration.samples.poller;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -25,75 +27,79 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @version 1.0
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
- private Main() { }
+ private Main() {
+ }
- /**
- * Load the Spring Integration Application Context
- *
- * @param args - command line arguments
- */
- public static void main(final String... args) {
+ /**
+ * Load the Spring Integration Application Context
+ *
+ * @param args - command line arguments
+ */
+ public static void main(final String... args) {
- LOGGER.info("\n=========================================================="
- + "\n "
- + "\n Welcome to the Spring Integration Dynamic Poller Sample! "
- + "\n "
- + "\n For more information please visit: "
- + "\n http://www.springsource.org/spring-integration "
- + "\n "
- + "\n==========================================================" );
+ LOGGER.info("\n=========================================================="
+ + "\n "
+ + "\n Welcome to the Spring Integration Dynamic Poller Sample! "
+ + "\n "
+ + "\n For more information please visit: "
+ + "\n http://www.springsource.org/spring-integration "
+ + "\n "
+ + "\n==========================================================");
- final AbstractApplicationContext context =
- new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");
+ final AbstractApplicationContext context = new ClassPathXmlApplicationContext(
+ "classpath:META-INF/spring/integration/*-context.xml");
- context.registerShutdownHook();
+ context.registerShutdownHook();
- final Scanner scanner = new Scanner(System.in);
+ final Scanner scanner = new Scanner(System.in);
- final DynamicPeriodicTrigger trigger = context.getBean(DynamicPeriodicTrigger.class);
+ final DynamicPeriodicTrigger trigger = context.getBean(DynamicPeriodicTrigger.class);
- LOGGER.info("\n========================================================="
- + "\n "
- + "\n Please press 'q + Enter' to quit the application. "
- + "\n "
- + "\n=========================================================" );
+ LOGGER.info("\n========================================================="
+ + "\n "
+ + "\n Please press 'q + Enter' to quit the application. "
+ + "\n "
+ + "\n=========================================================");
- System.out.print("Please enter a non-negative numeric value and press : ");
+ System.out.print("Please enter a non-negative numeric value and press : ");
- while (true) {
-
- final String input = scanner.nextLine();
-
- if("q".equals(input.trim())) {
- break;
- }
-
- try {
-
- int triggerPeriod = Integer.valueOf(input);
-
- System.out.println(String.format("Setting trigger period to '%s' ms", triggerPeriod));
-
- trigger.setPeriod(triggerPeriod);
-
- } catch (Exception e) {
- LOGGER.error("An exception was caught: " + e);
- }
+ while (true) {
- System.out.print("Please enter a non-negative numeric value and press : ");
-
- }
+ final String input = scanner.nextLine();
- LOGGER.info("Exiting application...bye.");
+ if ("q".equals(input.trim())) {
+ break;
+ }
- System.exit(0);
+ try {
- }
+ int triggerPeriod = Integer.valueOf(input);
+
+ System.out.println(String.format("Setting trigger period to '%s' ms", triggerPeriod));
+
+ trigger.setPeriod(triggerPeriod);
+
+ }
+ catch (Exception e) {
+ LOGGER.error("An exception was caught: " + e);
+ }
+
+ System.out.print("Please enter a non-negative numeric value and press : ");
+
+ }
+
+ LOGGER.info("Exiting application...bye.");
+
+ scanner.close();
+ context.close();
+
+ }
}
diff --git a/intermediate/dynamic-poller/src/main/resources/log4j.xml b/intermediate/dynamic-poller/src/main/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/intermediate/dynamic-poller/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/dynamic-poller/src/main/resources/log4j2.xml b/intermediate/dynamic-poller/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/dynamic-poller/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/errorhandling/pom.xml b/intermediate/errorhandling/pom.xml
index 89601e05..be8fea22 100644
--- a/intermediate/errorhandling/pom.xml
+++ b/intermediate/errorhandling/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java b/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java
index c777b570..228a0ea2 100644
--- a/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java
+++ b/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java
@@ -1,4 +1,4 @@
-/* Copyright 2002-2008 the original author or authors.
+/* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,19 +15,22 @@
package org.springframework.integration.samples.errorhandling;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.annotation.MessageEndpoint;
/**
* This guest receives invitations, but returns them to sender with a wrong
* address exception message.
- *
+ *
* @author Iwein Fuld
+ * @author Gary Russell
*/
@MessageEndpoint
public class PartyGuest {
- private Logger logger = Logger.getLogger(PartyGuest.class);
-
+ private final Log logger = LogFactory.getLog(PartyGuest.class);
+
public void onInvitation(Invitation invitation) {
logger.info("Guest is throwing exception");
throw new RuntimeException("Wrong address");
diff --git a/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java b/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java
index 624102a3..894b8679 100644
--- a/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java
+++ b/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java
@@ -1,4 +1,4 @@
-/* Copyright 2002-2008 the original author or authors.
+/* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,18 +17,21 @@ package org.springframework.integration.samples.errorhandling;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.annotation.MessageEndpoint;
/**
* Sends invitations to PartyGuests and likes to be notified of
* delivery failures of course.
- *
+ *
* @author Iwein Fuld
+ * @author Gary Russell
*/
@MessageEndpoint
public class PartyHost {
- private Logger logger = Logger.getLogger(PartyHost.class);
+ private final Log logger = LogFactory.getLog(PartyHost.class);
private final AtomicInteger counter = new AtomicInteger(0);
public Invitation nextInvitation() {
diff --git a/intermediate/errorhandling/src/test/resources/log4j.xml b/intermediate/errorhandling/src/test/resources/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/intermediate/errorhandling/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/errorhandling/src/test/resources/log4j2.xml b/intermediate/errorhandling/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/errorhandling/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/file-processing/pom.xml b/intermediate/file-processing/pom.xml
index 691bdfce..19ca8143 100644
--- a/intermediate/file-processing/pom.xml
+++ b/intermediate/file-processing/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-file
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/file-processing/src/main/java/org/springframework/integration/samples/fileprocessing/FileProcessor.java b/intermediate/file-processing/src/main/java/org/springframework/integration/samples/fileprocessing/FileProcessor.java
index 65bcbccb..ba0f7d98 100644
--- a/intermediate/file-processing/src/main/java/org/springframework/integration/samples/fileprocessing/FileProcessor.java
+++ b/intermediate/file-processing/src/main/java/org/springframework/integration/samples/fileprocessing/FileProcessor.java
@@ -1,22 +1,36 @@
-/**
- *
+/*
+ * Copyright 2002-2017 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
+
package org.springframework.integration.samples.fileprocessing;
import java.io.File;
import java.util.Random;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* @author ozhurakousky
*
*/
public class FileProcessor {
- private Random random = new Random();
- private Logger logger = Logger.getLogger(FileProcessor.class);
+ private final Random random = new Random();
+ private final Log logger = LogFactory.getLog(FileProcessor.class);
- public File process(File file) throws Exception{
+ public File process(File file) throws Exception{
Thread.sleep(random.nextInt(10)*500);
logger.info("Processing File: " + file);
return file;
diff --git a/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java b/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java
index 6f20ca73..8842c135 100644
--- a/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java
+++ b/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java
@@ -1,13 +1,27 @@
-/**
+/*
+ * Copyright 2002-2017 the original author or authors.
*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
+
package org.springframework.integration.samples.fileprocessing;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
@@ -17,11 +31,12 @@ import org.springframework.messaging.PollableChannel;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class FileProcessingTest {
- private int fileCount = 5;
- private Logger logger = Logger.getLogger(FileProcessingTest.class);
+ private final int fileCount = 5;
+ private final Log logger = LogFactory.getLog(FileProcessingTest.class);
@Before
public void createDirectory(){
@@ -70,6 +85,6 @@ public class FileProcessingTest {
for (int i = 0; i < fileCount; i++) {
logger.info("Finished processing " + filesOutChannel.receive(10000).getPayload());
}
- ac.stop();
+ ac.close();
}
}
diff --git a/intermediate/file-processing/src/test/resources/log4j.xml b/intermediate/file-processing/src/test/resources/log4j.xml
deleted file mode 100644
index 6c7b7d46..00000000
--- a/intermediate/file-processing/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/file-processing/src/test/resources/log4j2.xml b/intermediate/file-processing/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/file-processing/src/test/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/mail-attachments/pom.xml b/intermediate/mail-attachments/pom.xml
index 7663a2ea..b235e581 100644
--- a/intermediate/mail-attachments/pom.xml
+++ b/intermediate/mail-attachments/pom.xml
@@ -56,35 +56,71 @@
org.springframework.integration
spring-integration-mail
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-file
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
javax.mail
javax.mail-api
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.sun.mail
javax.mail
1.5.5
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
commons-io
commons-io
2.4
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -92,6 +128,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +143,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -110,6 +156,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -120,17 +170,35 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.subethamail
subethasmtp-wiser
1.2
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -150,14 +218,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/Main.java b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/Main.java
index 795c7990..501cc15c 100644
--- a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/Main.java
+++ b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,9 @@ package org.springframework.integration.samples.mailattachments;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -25,12 +27,13 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.2
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private static final String HORIZONTAL_LINE =
"\n=========================================================";
@@ -78,7 +81,8 @@ public final class Main {
LOGGER.info("Exiting application...bye.");
- System.exit(0);
+ scanner.close();
+ context.close();
}
}
diff --git a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailParserUtils.java b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailParserUtils.java
index 33d001a5..e0fe81ff 100644
--- a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailParserUtils.java
+++ b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailParserUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,19 +30,22 @@ import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.ParseException;
import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.util.Assert;
/**
* Utility Class for parsing mail messages.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.2
*
*/
public final class EmailParserUtils {
- private static final Logger LOGGER = Logger.getLogger(EmailParserUtils.class);
+ private static final Log LOGGER = LogFactory.getLog(EmailParserUtils.class);
/** Prevent instantiation. */
private EmailParserUtils() {
diff --git a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailTransformer.java b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailTransformer.java
index dbe1599f..d5e134ca 100644
--- a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailTransformer.java
+++ b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailTransformer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@ package org.springframework.integration.samples.mailattachments.support;
import java.util.ArrayList;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.annotation.Transformer;
/**
@@ -26,12 +28,13 @@ import org.springframework.integration.annotation.Transformer;
* a {@link List} of {@link EmailFragment}s.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.2
*
*/
public class EmailTransformer {
- private static final Logger LOGGER = Logger.getLogger(EmailTransformer.class);
+ private static final Log LOGGER = LogFactory.getLog(EmailTransformer.class);
@Transformer
public List transformit(javax.mail.Message mailMessage) {
diff --git a/intermediate/mail-attachments/src/main/resources/log4j.xml b/intermediate/mail-attachments/src/main/resources/log4j.xml
deleted file mode 100644
index a78006b5..00000000
--- a/intermediate/mail-attachments/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/mail-attachments/src/main/resources/log4j2.xml b/intermediate/mail-attachments/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/mail-attachments/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/mail-attachments/src/test/java/org/springframework/integration/samples/mailattachments/MimeMessageParsingTest.java b/intermediate/mail-attachments/src/test/java/org/springframework/integration/samples/mailattachments/MimeMessageParsingTest.java
index 3adad44b..b1daef68 100644
--- a/intermediate/mail-attachments/src/test/java/org/springframework/integration/samples/mailattachments/MimeMessageParsingTest.java
+++ b/intermediate/mail-attachments/src/test/java/org/springframework/integration/samples/mailattachments/MimeMessageParsingTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,11 +25,15 @@ import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.subethamail.wiser.Wiser;
+import org.subethamail.wiser.WiserMessage;
+
import org.springframework.core.io.ByteArrayResource;
import org.springframework.integration.samples.mailattachments.support.EmailFragment;
import org.springframework.integration.samples.mailattachments.support.EmailParserUtils;
@@ -37,18 +41,17 @@ import org.springframework.integration.test.util.SocketUtils;
import org.springframework.mail.MailParseException;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.mail.javamail.MimeMessageHelper;
-import org.subethamail.wiser.Wiser;
-import org.subethamail.wiser.WiserMessage;
/**
* Test to verify the correct parsing of Email Messages.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.2
*/
public class MimeMessageParsingTest {
- private static final Logger LOGGER = Logger.getLogger(MimeMessageParsingTest.class);
+ private static final Log LOGGER = LogFactory.getLog(MimeMessageParsingTest.class);
private Wiser wiser;
diff --git a/intermediate/monitoring/pom.xml b/intermediate/monitoring/pom.xml
index 9ef4c0c2..a081f036 100644
--- a/intermediate/monitoring/pom.xml
+++ b/intermediate/monitoring/pom.xml
@@ -56,33 +56,117 @@
org.springframework.integration
spring-integration-jmx
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.integration
spring-integration-twitter
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.integration
spring-integration-groovy
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-webmvc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
javax.servlet
jstl
1.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
junit
@@ -90,6 +174,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -101,6 +189,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -108,6 +202,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -118,6 +216,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -152,14 +256,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/monitoring/src/main/resources/log4j.xml b/intermediate/monitoring/src/main/resources/log4j.xml
deleted file mode 100644
index e5a608fe..00000000
--- a/intermediate/monitoring/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/monitoring/src/main/resources/log4j2.xml b/intermediate/monitoring/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/monitoring/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/multipart-http/pom.xml b/intermediate/multipart-http/pom.xml
index 7d9eed68..c670317c 100644
--- a/intermediate/multipart-http/pom.xml
+++ b/intermediate/multipart-http/pom.xml
@@ -56,35 +56,119 @@
org.springframework.integration
spring-integration-http
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-webmvc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
com.fasterxml.jackson.core
jackson-databind
2.3.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-fileupload
commons-fileupload
1.2.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
commons-io
commons-io
2.4
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
junit
@@ -92,6 +176,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +191,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -110,6 +204,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -120,6 +218,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -154,14 +258,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiver.java b/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiver.java
index 0c7528a6..97c36c18 100644
--- a/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiver.java
+++ b/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,15 +17,18 @@ package org.springframework.integration.samples.multipart;
import java.util.LinkedList;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.integration.http.multipart.UploadedMultipartFile;
import org.springframework.util.LinkedMultiValueMap;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class MultipartReceiver {
- private static Logger logger = Logger.getLogger(MultipartReceiver.class);
+ private static Log logger = LogFactory.getLog(MultipartReceiver.class);
@SuppressWarnings("rawtypes")
public void receive(LinkedMultiValueMap multipartRequest){
diff --git a/intermediate/multipart-http/src/main/resources/log4j.xml b/intermediate/multipart-http/src/main/resources/log4j.xml
deleted file mode 100644
index 5715f370..00000000
--- a/intermediate/multipart-http/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/multipart-http/src/main/resources/log4j2.xml b/intermediate/multipart-http/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/multipart-http/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java b/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java
index 0de502e1..85796056 100644
--- a/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java
+++ b/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,27 +18,26 @@ package org.springframework.integration.samples.multipart;
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
-import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class MultipartClientForHttpOutboundClient {
- private static Logger logger = Logger.getLogger(MultipartClientForHttpOutboundClient.class);
+ private static Log logger = LogFactory.getLog(MultipartClientForHttpOutboundClient.class);
private static String resourcePath = "org/springframework/integration/samples/multipart/spring09_logo.png";
- /**
- * @param args
- */
public static void main(String[] args) throws Exception{
- ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/http-outbound-config.xml");
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/http-outbound-config.xml");
Resource s2logo = new ClassPathResource(resourcePath);
Map multipartMap = new HashMap();
multipartMap.put("company", new String[]{"SpringSource", "VMWare"});
@@ -47,5 +46,7 @@ public class MultipartClientForHttpOutboundClient {
MultipartRequestGateway requestGateway = context.getBean("requestGateway", MultipartRequestGateway.class);
HttpStatus reply = requestGateway.postMultipartRequest(multipartMap);
System.out.println("Replied with HttpStatus code: " + reply);
+ context.close();
}
+
}
diff --git a/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartRestClient.java b/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartRestClient.java
index d9f23d95..04127443 100644
--- a/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartRestClient.java
+++ b/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartRestClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,9 @@
*/
package org.springframework.integration.samples.multipart;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpEntity;
@@ -29,17 +31,17 @@ import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class MultipartRestClient {
- private static Logger logger = Logger.getLogger(MultipartRestClient.class);
+ private static Log logger = LogFactory.getLog(MultipartRestClient.class);
+
private static String uri = "http://localhost:8080/multipart-http/inboundAdapter.htm";
+
private static String resourcePath = "org/springframework/integration/samples/multipart/spring09_logo.png";
- /**
- * @param args
- */
public static void main(String[] args) throws Exception{
RestTemplate template = new RestTemplate();
Resource s2logo = new ClassPathResource(resourcePath);
diff --git a/intermediate/rest-http/pom.xml b/intermediate/rest-http/pom.xml
index 7ac05eb9..6f82dcdc 100644
--- a/intermediate/rest-http/pom.xml
+++ b/intermediate/rest-http/pom.xml
@@ -56,66 +56,234 @@
org.springframework.integration
spring-integration-http
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-webmvc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-oxm
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-tx
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-jdbc
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-context
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework
spring-aop
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
com.fasterxml.jackson.core
jackson-databind
2.3.2
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.security
spring-security-web
4.2.2.RELEASE
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.springframework.security
spring-security-config
4.2.2.RELEASE
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
org.jasypt
jasypt
1.7
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ spring-boot-starter-tomcat
+ *
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
+ spring-boot-starter-jetty
+ *
+
+
junit
@@ -123,6 +291,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -134,6 +306,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -141,6 +319,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -151,6 +333,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -185,14 +373,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java
index e5a30abb..269dca31 100644
--- a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java
+++ b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,8 @@ package org.springframework.integration.samples.rest.service;
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.integration.samples.rest.domain.Employee;
import org.springframework.integration.samples.rest.domain.EmployeeList;
@@ -36,7 +37,7 @@ import org.springframework.stereotype.Service;
@Service("employeeSearchService")
public class EmployeeSearchService {
- private static Logger logger = Logger.getLogger(EmployeeSearchService.class);
+ private static Log logger = LogFactory.getLog(EmployeeSearchService.class);
/**
* The API getEmployee() looks up the mapped in coming message header's id param
* and fills the return object with the appropriate employee details. The return
diff --git a/intermediate/rest-http/src/main/resources/log4j.properties b/intermediate/rest-http/src/main/resources/log4j.properties
deleted file mode 100644
index 96536975..00000000
--- a/intermediate/rest-http/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
-# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
-log4j.rootLogger=INFO, stdout, logfile
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss.SSS} %-5p [%t][%c] %m%n
-
-log4j.appender.logfile=org.apache.log4j.RollingFileAppender
-log4j.appender.logfile.File=${rest-http.root}/WEB-INF/logs/rest-http.log
-log4j.appender.logfile.MaxFileSize=25MB
-# Keep three backup files.
-log4j.appender.logfile.MaxBackupIndex=10
-# Pattern to output: date priority [category] - message
-log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
-
-log4j.logger.org.springframework.ws.client.MessageTracing.sent=TRACE
-log4j.logger.org.springframework.ws.client.MessageTracing.received=DEBUG
-log4j.logger.org.springframework.ws.server.MessageTracing=DEBUG
-
-# the httpclient.wire category provides a trace of all of
-# httpclient's network communication
-log4j.category.httpclient.wire=INFO
\ No newline at end of file
diff --git a/intermediate/rest-http/src/main/resources/log4j2.xml b/intermediate/rest-http/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/rest-http/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/rest-http/src/test/java/org/springframework/integration/samples/rest/RestHttpClientTest.java b/intermediate/rest-http/src/test/java/org/springframework/integration/samples/rest/RestHttpClientTest.java
index 0d6644b5..3bf164df 100644
--- a/intermediate/rest-http/src/test/java/org/springframework/integration/samples/rest/RestHttpClientTest.java
+++ b/intermediate/rest-http/src/test/java/org/springframework/integration/samples/rest/RestHttpClientTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,8 @@ import java.util.Map;
import javax.xml.transform.stream.StreamResult;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -52,6 +53,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
* RestHttpClientTest.java: Functional Test to test the REST HTTP Path usage. This test requires
* rest-http application running in HTTP environment.
* @author Vigil Bose
+ * @author Gary Russell
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath*:META-INF/spring/integration/http-outbound-config.xml"})
@@ -60,7 +62,7 @@ public class RestHttpClientTest {
@Autowired
private RestTemplate restTemplate;
private HttpMessageConverterExtractor responseExtractor;
- private static Logger logger = Logger.getLogger(RestHttpClientTest.class);
+ private static Log logger = LogFactory.getLog(RestHttpClientTest.class);
@Autowired
private Jaxb2Marshaller marshaller;
@Autowired
diff --git a/intermediate/rest-http/src/test/resources/log4j.xml b/intermediate/rest-http/src/test/resources/log4j.xml
deleted file mode 100644
index 19a9863d..00000000
--- a/intermediate/rest-http/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/retry-and-more/pom.xml b/intermediate/retry-and-more/pom.xml
index 5511bd29..da636dd3 100644
--- a/intermediate/retry-and-more/pom.xml
+++ b/intermediate/retry-and-more/pom.xml
@@ -56,21 +56,45 @@
org.springframework.integration
spring-integration-stream
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-amqp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-ftp
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-file
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -78,6 +102,10 @@
1.10.19
compile
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -89,12 +117,24 @@
hamcrest-all
1.3
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -102,6 +142,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -112,6 +156,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -131,14 +181,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/CircuitBreakerDemo.java b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/CircuitBreakerDemo.java
index 18ca0653..bdfcc6b7 100644
--- a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/CircuitBreakerDemo.java
+++ b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/CircuitBreakerDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.advice;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -27,7 +28,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public class CircuitBreakerDemo {
- private static final Logger LOGGER = Logger.getLogger(CircuitBreakerDemo.class);
+ private static final Log LOGGER = LogFactory.getLog(CircuitBreakerDemo.class);
public static void main(String[] args) throws Exception {
LOGGER.info("\n========================================================="
diff --git a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferDeleteAfterSuccessDemo.java b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferDeleteAfterSuccessDemo.java
index 7ab0df06..7368e0e2 100644
--- a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferDeleteAfterSuccessDemo.java
+++ b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferDeleteAfterSuccessDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,9 @@ package org.springframework.integration.samples.advice;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.commons.net.ftp.FTPFile;
-import org.apache.log4j.Logger;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -34,7 +35,7 @@ import org.springframework.integration.file.remote.session.SessionFactory;
*/
public class FileTransferDeleteAfterSuccessDemo {
- private static final Logger LOGGER = Logger.getLogger(FileTransferDeleteAfterSuccessDemo.class);
+ private static final Log LOGGER = LogFactory.getLog(FileTransferDeleteAfterSuccessDemo.class);
public static void main(String[] args) throws Exception {
LOGGER.info("\n========================================================="
diff --git a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferRenameAfterFailureDemo.java b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferRenameAfterFailureDemo.java
index bb20051b..0f0e70d4 100644
--- a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferRenameAfterFailureDemo.java
+++ b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/FileTransferRenameAfterFailureDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,9 @@ package org.springframework.integration.samples.advice;
import static org.mockito.Mockito.when;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.commons.net.ftp.FTPFile;
-import org.apache.log4j.Logger;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -32,7 +33,7 @@ import org.springframework.integration.file.remote.session.SessionFactory;
*/
public class FileTransferRenameAfterFailureDemo {
- private static final Logger LOGGER = Logger.getLogger(FileTransferRenameAfterFailureDemo.class);
+ private static final Log LOGGER = LogFactory.getLog(FileTransferRenameAfterFailureDemo.class);
public static void main(String[] args) throws Exception {
LOGGER.info("\n========================================================="
diff --git a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatefulRetryDemo.java b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatefulRetryDemo.java
index d8136e3f..abb9e056 100644
--- a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatefulRetryDemo.java
+++ b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatefulRetryDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.advice;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -27,7 +28,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public class StatefulRetryDemo {
- private static final Logger LOGGER = Logger.getLogger(StatefulRetryDemo.class);
+ private static final Log LOGGER = LogFactory.getLog(StatefulRetryDemo.class);
public static void main(String[] args) throws Exception {
LOGGER.info("\n========================================================="
diff --git a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatelessRetryDemo.java b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatelessRetryDemo.java
index 5b8df82f..1c3f638d 100644
--- a/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatelessRetryDemo.java
+++ b/intermediate/retry-and-more/src/main/java/org/springframework/integration/samples/advice/StatelessRetryDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.advice;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -27,7 +28,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public class StatelessRetryDemo {
- private static final Logger LOGGER = Logger.getLogger(StatelessRetryDemo.class);
+ private static final Log LOGGER = LogFactory.getLog(StatelessRetryDemo.class);
public static void main(String[] args) throws Exception {
LOGGER.info("\n========================================================="
diff --git a/intermediate/retry-and-more/src/main/resources/log4j.xml b/intermediate/retry-and-more/src/main/resources/log4j.xml
deleted file mode 100644
index d7e06682..00000000
--- a/intermediate/retry-and-more/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/retry-and-more/src/main/resources/log4j2.xml b/intermediate/retry-and-more/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6fca5db3
--- /dev/null
+++ b/intermediate/retry-and-more/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/splitter-aggregator-reaper/pom.xml b/intermediate/splitter-aggregator-reaper/pom.xml
index b1ee8bd7..1d9bafb9 100644
--- a/intermediate/splitter-aggregator-reaper/pom.xml
+++ b/intermediate/splitter-aggregator-reaper/pom.xml
@@ -56,18 +56,36 @@
org.springframework.integration
spring-integration-core
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
javax.inject
javax.inject
1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/Main.java b/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/Main.java
index d865e0c6..4f8e13ac 100644
--- a/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/Main.java
+++ b/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,9 @@ package org.springframework.integration.samples.splitteraggregator;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.samples.splitteraggregator.support.TestUtils;
@@ -27,12 +29,13 @@ import org.springframework.integration.samples.splitteraggregator.support.TestUt
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @version 1.0
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private Main() { }
@@ -98,7 +101,8 @@ public final class Main {
}
System.out.println("Exiting application...bye.");
- System.exit(0);
+ scanner.close();
+ context.close();
}
}
diff --git a/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchA.java b/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchA.java
index 536d4c22..4f972c94 100644
--- a/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchA.java
+++ b/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchA.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.splitteraggregator;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.integration.samples.splitteraggregator.support.CriteriaA;
@@ -23,11 +24,12 @@ import org.springframework.integration.samples.splitteraggregator.support.Criter
* One type of search.
*
* @author Christopher Hunt
+ * @author Gary Russell
*
*/
public class SearchA {
- private static final Logger LOGGER = Logger.getLogger(SearchA.class);
+ private static final Log LOGGER = LogFactory.getLog(SearchA.class);
private long executionTime = 1000L;
diff --git a/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchB.java b/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchB.java
index 30b3bfb0..1f49329e 100644
--- a/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchB.java
+++ b/intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchB.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,8 @@
*/
package org.springframework.integration.samples.splitteraggregator;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.integration.samples.splitteraggregator.support.CriteriaB;
@@ -23,11 +24,12 @@ import org.springframework.integration.samples.splitteraggregator.support.Criter
* Another type of search.
*
* @author Christopher Hunt
+ * @author Gary Russell
*
*/
public class SearchB {
- private static final Logger LOGGER = Logger.getLogger(SearchB.class);
+ private static final Log LOGGER = LogFactory.getLog(SearchB.class);
private long executionTime = 1000L;
diff --git a/intermediate/splitter-aggregator-reaper/src/main/resources/log4j.xml b/intermediate/splitter-aggregator-reaper/src/main/resources/log4j.xml
deleted file mode 100644
index c9992aa8..00000000
--- a/intermediate/splitter-aggregator-reaper/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/splitter-aggregator-reaper/src/main/resources/log4j2.xml b/intermediate/splitter-aggregator-reaper/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..2b720c08
--- /dev/null
+++ b/intermediate/splitter-aggregator-reaper/src/main/resources/log4j2.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/stored-procedures-derby/pom.xml b/intermediate/stored-procedures-derby/pom.xml
index 2ad69f77..cfd5659c 100644
--- a/intermediate/stored-procedures-derby/pom.xml
+++ b/intermediate/stored-procedures-derby/pom.xml
@@ -56,18 +56,36 @@
org.springframework.integration
spring-integration-jdbc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.apache.derby
derby
10.10.1.1
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -75,6 +93,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -86,6 +108,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -93,6 +121,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -103,6 +135,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -122,14 +160,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java b/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
index fd515e64..845abbf3 100644
--- a/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
+++ b/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,89 +18,83 @@ package org.springframework.integration.samples.storedprocedure;
import java.util.List;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-
import org.springframework.integration.model.CoffeeBeverage;
import org.springframework.integration.service.CoffeeService;
-
/**
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.1
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
- private static final String LINE = "\n=========================================================";
- private static final String NEWLINE = "\n ";
+ private static final String LINE = "\n=========================================================";
- private Main() { }
+ private static final String NEWLINE = "\n ";
- /**
- * Load the Spring Integration Application Context
- *
- * @param args - command line arguments
- */
- public static void main(final String... args) {
+ private Main() {
+ }
- LOGGER.info(LINE
- + LINE
- + "\n Welcome to Spring Integration Coffee Database! "
- + NEWLINE
- + "\n For more information please visit: "
- + "\n http://www.springsource.org/spring-integration "
- + NEWLINE
- + LINE );
+ /**
+ * Load the Spring Integration Application Context
+ *
+ * @param args - command line arguments
+ */
+ public static void main(final String... args) {
- final AbstractApplicationContext context =
- new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");
+ LOGGER.info(LINE + LINE + "\n Welcome to Spring Integration Coffee Database! " + NEWLINE
+ + "\n For more information please visit: "
+ + "\n http://www.springsource.org/spring-integration " + NEWLINE + LINE);
- context.registerShutdownHook();
+ final AbstractApplicationContext context = new ClassPathXmlApplicationContext(
+ "classpath:META-INF/spring/integration/*-context.xml");
- final Scanner scanner = new Scanner(System.in);
+ context.registerShutdownHook();
- final CoffeeService service = context.getBean(CoffeeService.class);
+ final Scanner scanner = new Scanner(System.in);
- LOGGER.info(LINE
- + NEWLINE
- + "\n Please press 'q + Enter' to quit the application. "
- + NEWLINE
- + LINE);
+ final CoffeeService service = context.getBean(CoffeeService.class);
- System.out.print("Please enter 'list' and press to get a list of coffees.");
- System.out.print("Enter a coffee id, e.g. '1' and press to get a description.\n\n");
+ LOGGER.info(LINE + NEWLINE + "\n Please press 'q + Enter' to quit the application. " + NEWLINE + LINE);
- while (!scanner.hasNext("q")) {
+ System.out.print("Please enter 'list' and press to get a list of coffees.");
+ System.out.print("Enter a coffee id, e.g. '1' and press to get a description.\n\n");
- String input = scanner.nextLine();
+ while (!scanner.hasNext("q")) {
- if ("list".equalsIgnoreCase(input)) {
- List coffeeBeverages = service.findAllCoffeeBeverages();
+ String input = scanner.nextLine();
- for (CoffeeBeverage coffeeBeverage : coffeeBeverages) {
- System.out.println(String.format("%s - %s", coffeeBeverage.getId(),
- coffeeBeverage.getName()));
- }
+ if ("list".equalsIgnoreCase(input)) {
+ List coffeeBeverages = service.findAllCoffeeBeverages();
- } else {
- System.out.println("Retrieving coffee information...");
- String coffeeDescription = service.findCoffeeBeverage(Integer.valueOf(input));
+ for (CoffeeBeverage coffeeBeverage : coffeeBeverages) {
+ System.out.println(String.format("%s - %s", coffeeBeverage.getId(), coffeeBeverage.getName()));
+ }
- System.out.println(String.format("Searched for '%s' - Found: '%s'.", input, coffeeDescription));
- System.out.print("To try again, please enter another coffee beaverage and press :\n\n");
- }
+ }
+ else {
+ System.out.println("Retrieving coffee information...");
+ String coffeeDescription = service.findCoffeeBeverage(Integer.valueOf(input));
- }
+ System.out.println(String.format("Searched for '%s' - Found: '%s'.", input, coffeeDescription));
+ System.out.print("To try again, please enter another coffee beaverage and press :\n\n");
+ }
- LOGGER.info("Exiting application...bye.");
+ }
- System.exit(0);
+ LOGGER.info("Exiting application...bye.");
+ scanner.close();
+ context.close();
- }
+ }
}
diff --git a/intermediate/stored-procedures-derby/src/main/resources/log4j.xml b/intermediate/stored-procedures-derby/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/intermediate/stored-procedures-derby/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/stored-procedures-derby/src/main/resources/log4j2.xml b/intermediate/stored-procedures-derby/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/stored-procedures-derby/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/stored-procedures-ms/pom.xml b/intermediate/stored-procedures-ms/pom.xml
index 5e63265b..db45cd64 100644
--- a/intermediate/stored-procedures-ms/pom.xml
+++ b/intermediate/stored-procedures-ms/pom.xml
@@ -56,24 +56,48 @@
org.springframework.integration
spring-integration-jdbc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
net.sourceforge.jtds
jtds
1.2.6
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
c3p0
c3p0
0.9.1.2
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -81,6 +105,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -92,6 +120,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -99,6 +133,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -109,6 +147,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -128,14 +172,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/stored-procedures-ms/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java b/intermediate/stored-procedures-ms/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
index 3a92c2b9..1124e25e 100644
--- a/intermediate/stored-procedures-ms/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
+++ b/intermediate/stored-procedures-ms/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,10 +17,11 @@ package org.springframework.integration.samples.storedprocedure;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-
import org.springframework.integration.service.StringConversionService;
@@ -28,12 +29,13 @@ import org.springframework.integration.service.StringConversionService;
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @version 1.0
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private Main() { }
@@ -85,7 +87,8 @@ public final class Main {
LOGGER.info("Exiting application...bye.");
- System.exit(0);
-
+ scanner.close();
+ context.close();
}
+
}
diff --git a/intermediate/stored-procedures-ms/src/main/resources/log4j.xml b/intermediate/stored-procedures-ms/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/intermediate/stored-procedures-ms/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/stored-procedures-ms/src/main/resources/log4j2.xml b/intermediate/stored-procedures-ms/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/stored-procedures-ms/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/stored-procedures-oracle/pom.xml b/intermediate/stored-procedures-oracle/pom.xml
index 8e4dc5b8..ef09a596 100644
--- a/intermediate/stored-procedures-oracle/pom.xml
+++ b/intermediate/stored-procedures-oracle/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-jdbc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,6 +123,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -116,14 +148,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java b/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
index b530125e..7f0f57c9 100644
--- a/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
+++ b/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,8 @@ package org.springframework.integration.samples.storedprocedure;
import java.util.List;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.integration.model.CoffeeBeverage;
@@ -30,12 +31,13 @@ import org.springframework.integration.service.StringConversionService;
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @version 1.0
*
*/
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private Main() { }
@@ -82,7 +84,7 @@ public final class Main {
}
System.out.println("Exiting application.");
- System.exit(0);
+ scanner.close();
}
@@ -120,6 +122,7 @@ public final class Main {
System.out.print("To try again, please enter a string and press :");
}
+ scanner.close();
context.close();
System.out.println("Back to main menu.");
@@ -165,6 +168,7 @@ public final class Main {
}
+ scanner.close();
context.close();
System.out.println("Back to main menu.");
diff --git a/intermediate/stored-procedures-oracle/src/main/resources/log4j.xml b/intermediate/stored-procedures-oracle/src/main/resources/log4j.xml
deleted file mode 100644
index c80a153b..00000000
--- a/intermediate/stored-procedures-oracle/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/stored-procedures-oracle/src/main/resources/log4j2.xml b/intermediate/stored-procedures-oracle/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/stored-procedures-oracle/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/stored-procedures-postgresql/pom.xml b/intermediate/stored-procedures-postgresql/pom.xml
index ca35a4ac..7a4b1c63 100644
--- a/intermediate/stored-procedures-postgresql/pom.xml
+++ b/intermediate/stored-procedures-postgresql/pom.xml
@@ -56,30 +56,60 @@
org.springframework.integration
spring-integration-jdbc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- postgresql
+ org.postgresql
postgresql
- 9.1-901-1.jdbc4
+ 42.0.0
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
commons-dbcp
commons-dbcp
1.2.2
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
commons-pool
commons-pool
1.5.4
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -87,6 +117,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -98,6 +132,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -105,6 +145,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -115,6 +159,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -134,14 +184,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java b/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
index 28ceedc4..7aa0c585 100644
--- a/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
+++ b/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/samples/storedprocedure/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,8 @@ package org.springframework.integration.samples.storedprocedure;
import java.util.List;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -30,12 +31,13 @@ import org.springframework.integration.service.CoffeeService;
* Starts the Spring Context and will initialize the Spring Integration routes.
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.2
*
*/
public class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
private static final String LINE = "\n=========================================================";
private static final String NEWLINE = "\n";
@@ -100,7 +102,8 @@ public class Main {
LOGGER.info("Exiting application...bye.");
- System.exit(0);
+ scanner.close();
+ context.close();
}
}
diff --git a/intermediate/tcp-client-server-multiplex/pom.xml b/intermediate/tcp-client-server-multiplex/pom.xml
index 8b240ba4..6a5274cc 100644
--- a/intermediate/tcp-client-server-multiplex/pom.xml
+++ b/intermediate/tcp-client-server-multiplex/pom.xml
@@ -56,12 +56,24 @@
org.springframework.integration
spring-integration-ip
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -69,6 +81,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -80,6 +96,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -87,6 +109,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -97,11 +123,23 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -121,14 +159,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java b/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java
index d34d467d..74e10ee3 100644
--- a/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java
+++ b/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java
@@ -25,4 +25,4 @@ public interface SimpleGateway {
String send(String text);
-}
\ No newline at end of file
+}
diff --git a/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml b/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml
deleted file mode 100644
index 19d26e5d..00000000
--- a/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/tcp-client-server-multiplex/src/main/resources/log4j2.xml b/intermediate/tcp-client-server-multiplex/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/tcp-client-server-multiplex/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/tcp-client-server-multiplex/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java b/intermediate/tcp-client-server-multiplex/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java
index 0139a442..d9957016 100644
--- a/intermediate/tcp-client-server-multiplex/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java
+++ b/intermediate/tcp-client-server-multiplex/src/test/java/org/springframework/integration/samples/tcpclientserver/support/CustomTestContextLoader.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@ package org.springframework.integration.samples.tcpclientserver.support;
import java.util.HashMap;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.env.MapPropertySource;
import org.springframework.integration.test.util.SocketUtils;
@@ -28,11 +30,12 @@ import org.springframework.test.context.support.GenericXmlContextLoader;
/**
*
* @author Gunnar Hillert
+ * @author Gary Russell
*
*/
public class CustomTestContextLoader extends GenericXmlContextLoader {
- private static final Logger LOGGER = Logger.getLogger(CustomTestContextLoader.class);
+ private static final Log LOGGER = LogFactory.getLog(CustomTestContextLoader.class);
@Override
protected void loadBeanDefinitions(GenericApplicationContext context,
diff --git a/intermediate/travel/pom.xml b/intermediate/travel/pom.xml
index 4d05280e..0871bb6f 100644
--- a/intermediate/travel/pom.xml
+++ b/intermediate/travel/pom.xml
@@ -56,22 +56,46 @@
org.springframework.integration
spring-integration-ws
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-http
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework
spring-web
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -79,6 +103,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -90,6 +118,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -97,6 +131,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -107,6 +145,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -126,14 +170,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/Main.java b/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/Main.java
index 4ac5f446..de4f4ada 100644
--- a/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/Main.java
+++ b/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,13 +17,15 @@ package org.springframework.integration.samples.travel;
import java.util.Scanner;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
public final class Main {
- private static final Logger LOGGER = Logger.getLogger(Main.class);
+ private static final Log LOGGER = LogFactory.getLog(Main.class);
/**
* Prevent instantiation.
@@ -73,8 +75,9 @@ public final class Main {
if("q".equals(input.trim())) {
System.out.println("Exiting application...bye.");
- System.exit(0);
- } else {
+ break;
+ }
+ else {
final Integer cityId = Integer.valueOf(input);
final City city = City.getCityForId(cityId);
@@ -93,7 +96,8 @@ public final class Main {
+ "\n Traffic:"
+ "\n=========================================================" );
System.out.println(trafficReply);
- } else {
+ }
+ else {
LOGGER.warn("Skipping Traffic Information call. Did you setup your MapQuest API Key? " +
"e.g. by calling:\n\n $ mvn exec:java -Dmapquest.apikey=\"your_mapquest_api_key_url_decoded\"");
}
@@ -104,5 +108,9 @@ public final class Main {
System.out.print("Enter your choice: ");
}
}
+
+ scanner.close();
+ context.close();
}
+
}
diff --git a/intermediate/travel/src/main/resources/log4j.xml b/intermediate/travel/src/main/resources/log4j.xml
deleted file mode 100644
index 40d94ca5..00000000
--- a/intermediate/travel/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/travel/src/main/resources/log4j2.xml b/intermediate/travel/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..6241eb50
--- /dev/null
+++ b/intermediate/travel/src/main/resources/log4j2.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java b/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java
index 33ea3a51..7f6cccc6 100644
--- a/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java
+++ b/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,11 +15,13 @@
*/
package org.springframework.integration.samples.travel;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -28,6 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* This test will test the weather service (does not require an API key).
*
* @author Gunnar Hillert
+ * @author Gary Russell
* @since 2.2
*
*/
@@ -38,7 +41,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@Ignore("The target WeatherWS is unreliable (INTSAMPLES-145), so uncomment if you'd like to test the real interaction")
public class TravelGatewayTest {
- private static final Logger LOGGER = Logger.getLogger(TravelGatewayTest.class);
+ private static final Log LOGGER = LogFactory.getLog(TravelGatewayTest.class);
@Autowired
private TravelGateway travelGateway;
diff --git a/intermediate/tx-synch/pom.xml b/intermediate/tx-synch/pom.xml
index 828ef521..a6ad6748 100644
--- a/intermediate/tx-synch/pom.xml
+++ b/intermediate/tx-synch/pom.xml
@@ -56,23 +56,47 @@
org.springframework.integration
spring-integration-jdbc
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.springframework.integration
spring-integration-file
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
com.h2database
h2
- 1.3.175
+ 1.4.194
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-core
+ 2.7
compile
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
junit
@@ -80,6 +104,10 @@
4.12
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -91,6 +119,12 @@
hamcrest-all
1.3
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
org.mockito
@@ -98,6 +132,10 @@
1.10.19
test
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
*
org.hamcrest
@@ -108,6 +146,12 @@
org.springframework
spring-test
test
+
+
+ jackson-module-kotlin
+ com.fasterxml.jackson.module
+
+
@@ -127,14 +171,14 @@
org.springframework.integration
spring-integration-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.M6
import
pom
org.springframework
spring-framework-bom
- 5.0.0.BUILD-SNAPSHOT
+ 5.0.0.RC3
import
pom
diff --git a/intermediate/tx-synch/src/main/java/org/springframework/integration/samples/advice/TransactionSynchronizationDemo.java b/intermediate/tx-synch/src/main/java/org/springframework/integration/samples/advice/TransactionSynchronizationDemo.java
index 944a7b9f..1cc589b5 100755
--- a/intermediate/tx-synch/src/main/java/org/springframework/integration/samples/advice/TransactionSynchronizationDemo.java
+++ b/intermediate/tx-synch/src/main/java/org/springframework/integration/samples/advice/TransactionSynchronizationDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,9 @@
*/
package org.springframework.integration.samples.advice;
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -26,7 +28,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public class TransactionSynchronizationDemo {
- private static final Logger LOGGER = Logger.getLogger(TransactionSynchronizationDemo.class);
+ private static final Log LOGGER = LogFactory.getLog(TransactionSynchronizationDemo.class);
public static void main(String[] args) throws Exception {
LOGGER.info("\n========================================================="
@@ -58,6 +60,7 @@ public class TransactionSynchronizationDemo {
+ "\n=========================================================" );
System.out.println(System.getProperty("java.io.tmpdir") + "/txSynchDemo");
System.in.read();
- System.exit(0);
+ context.close();
}
+
}
diff --git a/intermediate/tx-synch/src/main/resources/log4j.xml b/intermediate/tx-synch/src/main/resources/log4j.xml
deleted file mode 100755
index 493991ec..00000000
--- a/intermediate/tx-synch/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intermediate/tx-synch/src/main/resources/log4j2.xml b/intermediate/tx-synch/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..8b188ec3
--- /dev/null
+++ b/intermediate/tx-synch/src/main/resources/log4j2.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+