diff --git a/advanced/advanced-testing-examples/src/test/resources/log4j.xml b/advanced/advanced-testing-examples/src/test/resources/log4j.xml index 4425c96a..de52c70f 100644 --- a/advanced/advanced-testing-examples/src/test/resources/log4j.xml +++ b/advanced/advanced-testing-examples/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/advanced/dynamic-ftp/src/test/resources/log4j.properties b/advanced/dynamic-ftp/src/test/resources/log4j.properties deleted file mode 100644 index c4672eb7..00000000 --- a/advanced/dynamic-ftp/src/test/resources/log4j.properties +++ /dev/null @@ -1,8 +0,0 @@ -log4j.rootCategory=WARN, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n - -log4j.category.org.springframework=WARN -log4j.category.org.springframework.integration=DEBUG diff --git a/advanced/dynamic-ftp/src/test/resources/log4j.xml b/advanced/dynamic-ftp/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/advanced/dynamic-ftp/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/applications/cafe-scripted/src/main/resources/log4j.xml b/applications/cafe-scripted/src/main/resources/log4j.xml index fd99f56c..00e7276b 100644 --- a/applications/cafe-scripted/src/main/resources/log4j.xml +++ b/applications/cafe-scripted/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -18,11 +18,11 @@ - + - + diff --git a/applications/cafe/src/test/resources/log4j.xml b/applications/cafe/src/test/resources/log4j.xml index bbcbcf15..317bd182 100644 --- a/applications/cafe/src/test/resources/log4j.xml +++ b/applications/cafe/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/applications/loan-broker/src/main/resources/log4j.xml b/applications/loan-broker/src/main/resources/log4j.xml index 678b69b3..dbd3e859 100644 --- a/applications/loan-broker/src/main/resources/log4j.xml +++ b/applications/loan-broker/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/applications/loan-broker/src/test/resources/log4j.xml b/applications/loan-broker/src/test/resources/log4j.xml index 915427b4..d91ac270 100644 --- a/applications/loan-broker/src/test/resources/log4j.xml +++ b/applications/loan-broker/src/test/resources/log4j.xml @@ -6,13 +6,13 @@ - + - + diff --git a/applications/loanshark/src/main/resources/log4j.properties b/applications/loanshark/src/main/resources/log4j.properties deleted file mode 100644 index bbc1eca8..00000000 --- a/applications/loanshark/src/main/resources/log4j.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Updated at Tue Sep 07 17:11:52 EDT 2010 -#Tue Sep 07 17:11:52 EDT 2010 -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.rootLogger=DEBUG, stdout -log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout diff --git a/applications/loanshark/src/main/resources/log4j.xml b/applications/loanshark/src/main/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/applications/loanshark/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/applications/loanshark/src/test/resources/log4j.properties b/applications/loanshark/src/test/resources/log4j.properties deleted file mode 100644 index becbf46c..00000000 --- a/applications/loanshark/src/test/resources/log4j.properties +++ /dev/null @@ -1,12 +0,0 @@ -#Updated at Tue Mar 23 17:20:25 PDT 2010 -#Tue Mar 23 17:20:25 PDT 2010 -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.rootLogger=DEBUG, stdout, R -log4j.appender.R.File=application.log -log4j.appender.R.MaxFileSize=100KB -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.MaxBackupIndex=1 -log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n -log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.R=org.apache.log4j.RollingFileAppender diff --git a/applications/loanshark/src/test/resources/log4j.xml b/applications/loanshark/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/applications/loanshark/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/amqp/pom.xml b/basic/amqp/pom.xml index ec5e5745..4f732ed8 100644 --- a/basic/amqp/pom.xml +++ b/basic/amqp/pom.xml @@ -1,122 +1,107 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - amqp - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + amqp + 2.1.0.BUILD-SNAPSHOT + jar - Samples (Basic) - AMQP - http://www.springsource.org/spring-integration + Samples (Basic) - AMQP + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.6.4 - 4.10 - + + UTF-8 + 2.1.0.RELEASE + 1.2.16 + 4.10 + - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/milestone + + - - - - maven-eclipse-plugin - 2.8 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.samples.amqp.Main - - - - + + + + maven-eclipse-plugin + 2.8 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + org.springframework.integration.samples.amqp.Main + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - - org.springframework.integration - spring-integration-amqp - ${spring.integration.version} - + + org.springframework.integration + spring-integration-amqp + ${spring.integration.version} + - - org.springframework.integration - spring-integration-stream - ${spring.integration.version} - + + org.springframework.integration + spring-integration-stream + ${spring.integration.version} + - + - - ch.qos.logback - logback-classic - 1.0.0 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + log4j + log4j + ${log4j.version} + - + diff --git a/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/Main.java b/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/Main.java index 18451051..5bab07c7 100644 --- a/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/Main.java +++ b/basic/amqp/src/main/java/org/springframework/integration/samples/amqp/Main.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2012 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,8 +15,7 @@ */ package org.springframework.integration.samples.amqp; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.apache.log4j.Logger; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -30,41 +29,41 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; */ public final class Main { - private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); + private static final Logger LOGGER = Logger.getLogger(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 Spring Integration! " - + "\n " - + "\n For more information please visit: " - + "\n http://www.springsource.org/spring-integration " - + "\n " - + "\n=========================================================" ); + LOGGER.info("\n=========================================================" + + "\n " + + "\n Welcome to Spring Integration! " + + "\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(); - LOGGER.info("\n=========================================================" - + "\n " - + "\n This is the AMQP Sample - " - + "\n " - + "\n Please enter some text and press return. The entered " - + "\n Message will be sent to the configured RabbitMQ Queue," - + "\n then again immediately retrieved from the Message " - + "\n Broker and ultimately printed to the command line. " - + "\n " - + "\n=========================================================" ); + LOGGER.info("\n=========================================================" + + "\n " + + "\n This is the AMQP Sample - " + + "\n " + + "\n Please enter some text and press return. The entered " + + "\n Message will be sent to the configured RabbitMQ Queue," + + "\n then again immediately retrieved from the Message " + + "\n Broker and ultimately printed to the command line. " + + "\n " + + "\n=========================================================" ); - } + } } diff --git a/basic/amqp/src/main/resources/log4j.xml b/basic/amqp/src/main/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/amqp/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/amqp/src/main/resources/logback.xml b/basic/amqp/src/main/resources/logback.xml deleted file mode 100644 index 2bbecb62..00000000 --- a/basic/amqp/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - - diff --git a/basic/control-bus/src/test/resources/log4j.xml b/basic/control-bus/src/test/resources/log4j.xml index 678b69b3..89a1e58d 100644 --- a/basic/control-bus/src/test/resources/log4j.xml +++ b/basic/control-bus/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/enricher/pom.xml b/basic/enricher/pom.xml index ac790a4d..624f7db8 100644 --- a/basic/enricher/pom.xml +++ b/basic/enricher/pom.xml @@ -1,118 +1,103 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - enricher - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + enricher + 2.1.0.BUILD-SNAPSHOT + jar - Samples (Basic) - Enricher - http://www.springsource.org/spring-integration + Samples (Basic) - Enricher + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.6.4 - 4.10 - + + UTF-8 + 2.1.0.RELEASE + 1.2.16 + 4.10 + - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/milestone + + - - - - maven-eclipse-plugin - 2.8 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.samples.enricher.Main - - - - + + + + maven-eclipse-plugin + 2.8 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + org.springframework.integration.samples.enricher.Main + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - + - - ch.qos.logback - logback-classic - 1.0.0 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + log4j + log4j + ${log4j.version} + - + - - com.h2database - h2 - 1.3.162 - + + com.h2database + h2 + 1.3.162 + - + 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 76b6ce67..b909f4f6 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 @@ -19,8 +19,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Scanner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.apache.log4j.Logger; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.samples.enricher.service.UserService; @@ -35,108 +34,108 @@ import org.springframework.integration.samples.enricher.service.UserService; */ public final class Main { - private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); + private static final Logger LOGGER = Logger.getLogger(Main.class); - private static final String LINE_SEPARATOR = "\n=========================================================================="; - private static final String EMPTY_LINE = "\n "; + private static final String LINE_SEPARATOR = "\n=========================================================================="; + private static final String EMPTY_LINE = "\n "; - 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(LINE_SEPARATOR - + EMPTY_LINE - + "\n Welcome to Spring Integration! " - + EMPTY_LINE - + "\n For more information please visit: " - + "\n http://www.springsource.org/spring-integration " - + EMPTY_LINE - + LINE_SEPARATOR ); + LOGGER.info(LINE_SEPARATOR + + EMPTY_LINE + + "\n Welcome to Spring Integration! " + + EMPTY_LINE + + "\n For more information please visit: " + + "\n http://www.springsource.org/spring-integration " + + EMPTY_LINE + + LINE_SEPARATOR ); - 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 UserService service = context.getBean(UserService.class); + final UserService service = context.getBean(UserService.class); - LOGGER.info(LINE_SEPARATOR - + EMPTY_LINE - + "\n Please press 'q + Enter' to quit the application. " - + EMPTY_LINE - + LINE_SEPARATOR - + EMPTY_LINE - + "\n This example illustrates the usage of the Content Enricher. " - + EMPTY_LINE - + "\n Usage: Please enter 1 or 2 or 3 + Enter " - + EMPTY_LINE - + "\n 3 different message flows are triggered. For sample 1+2 a " - + "\n user object containing only the username is passed in. " - + "\n For sample 3 a Map with the 'username' key is passed in and enriched " - + "\n with the user object using the 'user' key. " - + EMPTY_LINE - + "\n 1: In the Enricher, pass the full User object to the request channel. " - + "\n 2: In the Enricher, pass only the username to the request channel. " - + "\n 3: In the Enricher, pass only the username to the request channel. " - + EMPTY_LINE - + LINE_SEPARATOR); + LOGGER.info(LINE_SEPARATOR + + EMPTY_LINE + + "\n Please press 'q + Enter' to quit the application. " + + EMPTY_LINE + + LINE_SEPARATOR + + EMPTY_LINE + + "\n This example illustrates the usage of the Content Enricher. " + + EMPTY_LINE + + "\n Usage: Please enter 1 or 2 or 3 + Enter " + + EMPTY_LINE + + "\n 3 different message flows are triggered. For sample 1+2 a " + + "\n user object containing only the username is passed in. " + + "\n For sample 3 a Map with the 'username' key is passed in and enriched " + + "\n with the user object using the 'user' key. " + + EMPTY_LINE + + "\n 1: In the Enricher, pass the full User object to the request channel. " + + "\n 2: In the Enricher, pass only the username to the request channel. " + + "\n 3: In the Enricher, pass only the username to the request channel. " + + EMPTY_LINE + + LINE_SEPARATOR); - while (!scanner.hasNext("q")) { + while (!scanner.hasNext("q")) { - final String input = scanner.nextLine(); + final String input = scanner.nextLine(); - User user = new User("foo", null, null); + User user = new User("foo", null, null); - if ("1".equals(input)) { + if ("1".equals(input)) { - final User fullUser = service.findUser(user); - printUserInformation(fullUser); + final User fullUser = service.findUser(user); + printUserInformation(fullUser); - } else if ("2".equals(input)) { + } else if ("2".equals(input)) { - final User fullUser = service.findUserByUsername(user); - printUserInformation(fullUser); + final User fullUser = service.findUserByUsername(user); + printUserInformation(fullUser); - } else if ("3".equals(input)) { + } else if ("3".equals(input)) { - final Map userData = new HashMap(); - userData.put("username", "foo_map"); + final Map userData = new HashMap(); + userData.put("username", "foo_map"); - final Map enrichedUserData = service.findUserWithUsernameInMap(userData); + final Map enrichedUserData = service.findUserWithUsernameInMap(userData); - final User fullUser = (User) enrichedUserData.get("user"); + final User fullUser = (User) enrichedUserData.get("user"); - printUserInformation(fullUser); + printUserInformation(fullUser); - } else { - LOGGER.info("\n\n Please enter '1', '2', or '3' :\n\n"); - } + } else { + LOGGER.info("\n\n Please enter '1', '2', or '3' :\n\n"); + } - } + } - LOGGER.info("\n\nExiting application...bye."); + LOGGER.info("\n\nExiting application...bye."); - System.exit(0); + System.exit(0); - } + } - private static void printUserInformation(User user) { + private static void printUserInformation(User user) { - if (user != null) { - LOGGER.info("\n\n User found - Username: '{}', Email: '{}', Password: '{}'.\n\n", - new Object[] {user.getUsername(), user.getEmail(), user.getPassword()}); + if (user != null) { + LOGGER.info(String.format("\n\n User found - Username: '%s', Email: '%s', Password: '%s'.\n\n", + user.getUsername(), user.getEmail(), user.getPassword())); - } else { - LOGGER.info("\n\n No User found for username: 'foo'.\n\n"); - } + } else { + LOGGER.info("\n\n No User found for username: 'foo'.\n\n"); + } - } + } } 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 a6a41625..42140320 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-2011 the original author or authors. + * Copyright 2002-2012 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,8 +15,7 @@ */ package org.springframework.integration.samples.enricher.service.impl; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.apache.log4j.Logger; import org.springframework.integration.samples.enricher.User; /** @@ -27,28 +26,28 @@ import org.springframework.integration.samples.enricher.User; */ public class SystemService { - private static final Logger LOGGER = LoggerFactory.getLogger(SystemService.class); + private static final Logger LOGGER = Logger.getLogger(SystemService.class); /** Default Constructor. */ public SystemService() { - super(); + super(); } public User findUser(User user) { - LOGGER.info("Calling method 'findUser' with parameter {}", user); + LOGGER.info(String.format("Calling method 'findUser' with parameter %s", user)); final User fullUser = new User(user.getUsername(), - "secret", - user.getUsername() + "@springintegration.org"); + "secret", + user.getUsername() + "@springintegration.org"); return fullUser; } public User findUserByUsername(String username) { - LOGGER.info("Calling method 'findUserByUsername' with parameter: {}", username); + LOGGER.info(String.format("Calling method 'findUserByUsername' with parameter: %s", username)); - return new User(username, "secret", username + "@springintegration.org"); + return new User(username, "secret", username + "@springintegration.org"); } diff --git a/basic/enricher/src/main/resources/log4j.xml b/basic/enricher/src/main/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/enricher/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/enricher/src/main/resources/logback.xml b/basic/enricher/src/main/resources/logback.xml deleted file mode 100644 index eee6b966..00000000 --- a/basic/enricher/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - - diff --git a/basic/feed/src/test/resources/log4j.properties b/basic/feed/src/test/resources/log4j.properties deleted file mode 100644 index d0b3fb0d..00000000 --- a/basic/feed/src/test/resources/log4j.properties +++ /dev/null @@ -1,8 +0,0 @@ -log4j.rootCategory=WARN, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n - -log4j.category.org.springframework=WARN -log4j.category.org.springframework.integration=INFO diff --git a/basic/feed/src/test/resources/log4j.xml b/basic/feed/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/feed/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/file/src/test/resources/log4j.xml b/basic/file/src/test/resources/log4j.xml index da348ad0..127e2d13 100644 --- a/basic/file/src/test/resources/log4j.xml +++ b/basic/file/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/ftp/pom.xml b/basic/ftp/pom.xml index d4f87df1..10fe593d 100644 --- a/basic/ftp/pom.xml +++ b/basic/ftp/pom.xml @@ -1,14 +1,15 @@ - - 4.0.0 - org.springframework.integration.samples - ftp + + 4.0.0 + org.springframework.integration.samples + ftp 2.1.0.BUILD-SNAPSHOT Samples (Basic) - FTP Demo jar - UTF-8 + UTF-8 2.2.0.M1 - 1.6.4 + 1.2.16 4.10 @@ -31,33 +32,25 @@ ${junit.version} - org.apache.ftpserver - ftpserver-core - 1.0.6 + org.apache.ftpserver + ftpserver-core + 1.0.6 - + + + + log4j + log4j + ${log4j.version} + + + + org.slf4j + slf4j-log4j12 + 1.5.2 + - - ch.qos.logback - logback-classic - 1.0.0 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - @@ -85,11 +78,11 @@ - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/milestone + + diff --git a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java index 3bed826d..e350f270 100644 --- a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java +++ b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java @@ -19,48 +19,46 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.io.File; - +import org.apache.log4j.Logger; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.Message; import org.springframework.integration.core.PollableChannel; /** - * + * * @author Oleg Zhurakousky * @author Gunnar Hillert * */ public class FtpInboundChannelAdapterSample { - private static final Logger LOGGER = LoggerFactory.getLogger(FtpInboundChannelAdapterSample.class); - + private static final Logger LOGGER = Logger.getLogger(FtpInboundChannelAdapterSample.class); + @Test public void runDemo() throws Exception{ - ConfigurableApplicationContext ctx = + ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext("META-INF/spring/integration/FtpInboundChannelAdapterSample-context.xml"); - + PollableChannel ftpChannel = ctx.getBean("ftpChannel", PollableChannel.class); - + Message message1 = ftpChannel.receive(2000); Message message2 = ftpChannel.receive(2000); Message message3 = ftpChannel.receive(1000); - LOGGER.info("Received first file message: {}.", message1); - LOGGER.info("Received second file message: {}.", message2); - LOGGER.info("Received nothing else: {}.", message3); - + LOGGER.info(String.format("Received first file message: %s.", message1)); + LOGGER.info(String.format("Received second file message: %s.", message2)); + LOGGER.info(String.format("Received nothing else: %s.", message3)); + assertNotNull(message1); assertNotNull(message2); assertNull("Was NOT expecting a third message.", message3); - + } - + @After public void cleanup() { FileUtils.deleteQuietly(new File(TestSuite.LOCAL_FTP_TEMP_DIR)); diff --git a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java index 0dba2369..fbff4ef7 100644 --- a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java +++ b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java @@ -19,12 +19,10 @@ import static org.junit.Assert.assertTrue; import java.io.File; import java.io.InputStream; - +import org.apache.log4j.Logger; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.Message; @@ -32,57 +30,57 @@ import org.springframework.integration.MessageChannel; import org.springframework.integration.support.MessageBuilder; /** - * + * * @author Oleg Zhurakousky * @author Gunnar Hillert * */ public class FtpOutboundChannelAdapterSample { - private static final Logger LOGGER = LoggerFactory.getLogger(FtpOutboundChannelAdapterSample.class); - + private static final Logger LOGGER = Logger.getLogger(FtpOutboundChannelAdapterSample.class); + private final File baseFolder = new File("target" + File.separator + "toSend"); - + @Test public void runDemo() throws Exception{ - - ConfigurableApplicationContext ctx = + + ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext("META-INF/spring/integration/FtpOutboundChannelAdapterSample-context.xml"); MessageChannel ftpChannel = ctx.getBean("ftpChannel", MessageChannel.class); baseFolder.mkdirs(); - + final File fileToSendA = new File(baseFolder, "a.txt"); - final File fileToSendB = new File(baseFolder, "b.txt"); - + final File fileToSendB = new File(baseFolder, "b.txt"); + final InputStream inputStreamA = FtpOutboundChannelAdapterSample.class.getResourceAsStream("/test-files/a.txt"); final InputStream inputStreamB = FtpOutboundChannelAdapterSample.class.getResourceAsStream("/test-files/b.txt"); - + FileUtils.copyInputStreamToFile(inputStreamA, fileToSendA); FileUtils.copyInputStreamToFile(inputStreamB, fileToSendB); - + assertTrue(fileToSendA.exists()); assertTrue(fileToSendB.exists()); - + final Message messageA = MessageBuilder.withPayload(fileToSendA).build(); final Message messageB = MessageBuilder.withPayload(fileToSendB).build(); - + ftpChannel.send(messageA); ftpChannel.send(messageB); - + Thread.sleep(2000); assertTrue(new File(TestSuite.FTP_ROOT_DIR + File.separator + "a.txt").exists()); assertTrue(new File(TestSuite.FTP_ROOT_DIR + File.separator + "b.txt").exists()); - + LOGGER.info("Successfully transfered file 'a.txt' and 'b.txt' to a remote FTP location."); - + } - + @After public void cleanup() { FileUtils.deleteQuietly(baseFolder); } - + } 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 20865ec8..b6f421fe 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 @@ -29,50 +29,50 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Demonstrates use of the outbound gateway to use ls, get and rm. - * + * * The previous Test {@link FtpOutboundChannelAdapterSample} was uploading 2 test * files: - * + * *
    *
  • a.txt
  • *
  • b.txt
  • *
* - * This test will now retrieves those 2 files and removes them. Instead of just - * polling the file, the files are instead retrieved and deleted using explicit + * This test will now retrieves those 2 files and removes them. Instead of just + * polling the file, the files are instead retrieved and deleted using explicit * FTP commands (LS and RM) - * + * * @author Gary Russell * @since 2.1 * */ public class FtpOutboundGatewaySample { - + @Test public void testLsGetRm() throws Exception { ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext( "classpath:/META-INF/spring/integration/FtpOutboundGatewaySample-context.xml"); - + final ToFtpFlowGateway toFtpFlow = ctx.getBean(ToFtpFlowGateway.class); // execute the flow (ls, get, rm, aggregate results) List rmResults = toFtpFlow.lsGetAndRmFiles("/"); - + //Check everything went as expected, and clean up assertEquals("Was expecting the collection 'rmResults' to contain 2 elements.", 2, rmResults.size()); - + for (Boolean result : rmResults) { assertTrue(result); } - + assertTrue("Expected FTP remote directory to be empty", new File(TestSuite.FTP_ROOT_DIR).delete()); } - + @After public void cleanup() { FileUtils.deleteQuietly(new File(TestSuite.LOCAL_FTP_TEMP_DIR)); } - + } \ No newline at end of file diff --git a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/TestSuite.java b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/TestSuite.java index 180f94ad..a8610552 100644 --- a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/TestSuite.java +++ b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/TestSuite.java @@ -34,15 +34,15 @@ import org.springframework.integration.samples.ftp.support.TestUserManager; /** * Test Suite that will bootstrap an embedded Apache FTP Server. Additionally some - * test files will be send to the FTP Server. - * - * + * test files will be send to the FTP Server. + * + * * @author Gunnar Hillert * */ @RunWith(Suite.class) @Suite.SuiteClasses({ - FtpOutboundChannelAdapterSample.class, + FtpOutboundChannelAdapterSample.class, FtpInboundChannelAdapterSample.class, FtpOutboundGatewaySample.class }) @@ -50,20 +50,20 @@ public class TestSuite { public static final String FTP_ROOT_DIR = "target" + File.separator + "ftproot"; public static final String LOCAL_FTP_TEMP_DIR = "target" + File.separator + "local-ftp-temp"; - + @ClassRule public static final TemporaryFolder temporaryFolder = new TemporaryFolder(); public static FtpServer server; - + @BeforeClass public static void setupFtpServer() throws FtpException, SocketException, IOException { File ftpRoot = new File (FTP_ROOT_DIR); ftpRoot.mkdirs(); - + TestUserManager userManager = new TestUserManager(ftpRoot.getAbsolutePath()); - + FtpServerFactory serverFactory = new FtpServerFactory(); serverFactory.setUserManager(userManager); ListenerFactory factory = new ListenerFactory(); @@ -71,13 +71,13 @@ public class TestSuite { factory.setPort(3333); serverFactory.addListener("default", factory.createListener()); - - server = serverFactory.createServer(); - + + server = serverFactory.createServer(); + server.start(); - + } - + @AfterClass public static void shutDown() { server.stop(); diff --git a/basic/ftp/src/test/resources/log4j.xml b/basic/ftp/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/ftp/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/ftp/src/test/resources/logback.xml b/basic/ftp/src/test/resources/logback.xml deleted file mode 100644 index 0c5ad886..00000000 --- a/basic/ftp/src/test/resources/logback.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - - - - - diff --git a/basic/helloworld/src/main/resources/log4j.xml b/basic/helloworld/src/main/resources/log4j.xml index 678b69b3..89a1e58d 100644 --- a/basic/helloworld/src/main/resources/log4j.xml +++ b/basic/helloworld/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/http/src/main/resources/log4j.xml b/basic/http/src/main/resources/log4j.xml index df1bb3f4..f80b6531 100644 --- a/basic/http/src/main/resources/log4j.xml +++ b/basic/http/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/http/src/test/java/log4j.xml b/basic/http/src/test/java/log4j.xml index 678b69b3..89a1e58d 100644 --- a/basic/http/src/test/java/log4j.xml +++ b/basic/http/src/test/java/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/jdbc/pom.xml b/basic/jdbc/pom.xml index 1e57c89c..e94a330a 100644 --- a/basic/jdbc/pom.xml +++ b/basic/jdbc/pom.xml @@ -1,123 +1,108 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - jdbc - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + jdbc + 2.1.0.BUILD-SNAPSHOT + jar - Samples (Basic) - JDBC - http://www.springsource.org/spring-integration + Samples (Basic) - JDBC + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.6.4 - 4.10 - + + UTF-8 + 2.1.0.RELEASE + 1.2.16 + 4.10 + - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/milestone + + - - - - maven-eclipse-plugin - 2.8 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.samples.jdbc.Main - - - - + + + + maven-eclipse-plugin + 2.8 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + org.springframework.integration.samples.jdbc.Main + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - - org.springframework.integration - spring-integration-jdbc - ${spring.integration.version} - + + org.springframework.integration + spring-integration-jdbc + ${spring.integration.version} + - + - - ch.qos.logback - logback-classic - 1.0.0 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + log4j + log4j + ${log4j.version} + - + - - com.h2database - h2 - 1.3.162 - - + + com.h2database + h2 + 1.3.162 + + 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 e338bff4..e3e7061d 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 @@ -21,8 +21,7 @@ import java.util.Date; import java.util.List; import java.util.Scanner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.apache.log4j.Logger; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.samples.jdbc.service.PersonService; @@ -38,109 +37,109 @@ import org.springframework.integration.samples.jdbc.service.PersonService; */ public final class Main { - private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); + private static final Logger LOGGER = Logger.getLogger(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 Spring Integration! " - + "\n " - + "\n For more information please visit: " - + "\n http://www.springsource.org/spring-integration " - + "\n " - + "\n=========================================================" ); + LOGGER.info("\n=========================================================" + + "\n " + + "\n Welcome to Spring Integration! " + + "\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 PersonService personService = context.getBean(PersonService.class); - LOGGER.info("\n=========================================================" - + "\n " - + "\n Please press 'q + Enter' to quit the application. " - + "\n " - + "\n=========================================================" ); + final PersonService personService = context.getBean(PersonService.class); - System.out.println("Please enter a choice and press : "); - System.out.println("\t1. Find person details"); - System.out.println("\t2. Create a new person detail"); - System.out.println("\tq. Quit the application"); - System.out.print("Enter you choice: "); - while (true) { - final String input = scanner.nextLine(); - if("1".equals(input.trim())) - getPersonDetails(scanner, personService); - else if("2".equals(input.trim())) - createPersonDetails(scanner,personService); - else if("q".equals(input.trim())) - break; - else - System.out.println("Invalid choice\n\n"); + LOGGER.info("\n=========================================================" + + "\n " + + "\n Please press 'q + Enter' to quit the application. " + + "\n " + + "\n=========================================================" ); - System.out.println("Please enter a choice and press : "); - System.out.println("\t1. Find person details"); - System.out.println("\t2. Create a new person detail"); - System.out.println("\tq. Quit the application"); - System.out.print("Enter you choice: "); - } + System.out.println("Please enter a choice and press : "); + System.out.println("\t1. Find person details"); + System.out.println("\t2. Create a new person detail"); + System.out.println("\tq. Quit the application"); + System.out.print("Enter you choice: "); + while (true) { + final String input = scanner.nextLine(); + if("1".equals(input.trim())) + getPersonDetails(scanner, personService); + else if("2".equals(input.trim())) + createPersonDetails(scanner,personService); + else if("q".equals(input.trim())) + break; + else + System.out.println("Invalid choice\n\n"); - LOGGER.info("Exiting application...bye."); + System.out.println("Please enter a choice and press : "); + System.out.println("\t1. Find person details"); + System.out.println("\t2. Create a new person detail"); + System.out.println("\tq. Quit the application"); + System.out.print("Enter you choice: "); + } - System.exit(0); + LOGGER.info("Exiting application...bye."); - } + System.exit(0); - private static void createPersonDetails(final Scanner scanner,PersonService service) { - while(true) { - System.out.print("\nEnter the Person's name:"); - String name = scanner.nextLine(); - Gender gender; - while(true) { - System.out.print("Enter the Person's gender(M/F):"); - String genderStr = scanner.nextLine(); - if("m".equalsIgnoreCase(genderStr) || "f".equalsIgnoreCase(genderStr)) { - gender = Gender.getGenderByIdentifier(genderStr.toUpperCase()); - break; - } - } - Date dateOfBirth; - SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); - while(true) { - System.out.print("Enter the Person's Date of birth in DD/MM/YYYY format:"); - String dobStr = scanner.nextLine(); - try { + } + + private static void createPersonDetails(final Scanner scanner,PersonService service) { + while(true) { + System.out.print("\nEnter the Person's name:"); + String name = scanner.nextLine(); + Gender gender; + while(true) { + System.out.print("Enter the Person's gender(M/F):"); + String genderStr = scanner.nextLine(); + if("m".equalsIgnoreCase(genderStr) || "f".equalsIgnoreCase(genderStr)) { + gender = Gender.getGenderByIdentifier(genderStr.toUpperCase()); + break; + } + } + Date dateOfBirth; + SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); + while(true) { + System.out.print("Enter the Person's Date of birth in DD/MM/YYYY format:"); + String dobStr = scanner.nextLine(); + try { dateOfBirth = format.parse(dobStr); break; } catch (ParseException e) { //Silently suppress and ask to enter details again - } - } - - Person person = new Person(); - person.setDateOfBirth(dateOfBirth); - person.setGender(gender); - person.setName(name); - person = service.createPerson(person); - System.out.println("Created person record with id: " + person.getPersonId()); - System.out.print("Do you want to create another person? (y/n)"); + } + } + + Person person = new Person(); + person.setDateOfBirth(dateOfBirth); + person.setGender(gender); + person.setName(name); + person = service.createPerson(person); + 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)) break; - } - } + } + } /** * @param service * @param input @@ -154,18 +153,18 @@ public final class Main { for(Person person:personList) { System.out.print( String.format("Person found - Person Id: '%d', Person Name is: '%s', Gender: '%s'", - person.getPersonId(),person.getName(), person.getGender())); + person.getPersonId(),person.getName(), person.getGender())); System.out.println(String.format(", Date of birth: '%1$td/%1$tm/%1$tC%1$ty'", person.getDateOfBirth())); } } else { System.out.println( String.format("No Person record found for name: '%s'.", input)); - } + } System.out.print("Do you want to find another person? (y/n)"); String choice = scanner.nextLine(); if(!"y".equalsIgnoreCase(choice)) - break; + break; } - + } } diff --git a/basic/jdbc/src/main/resources/log4j.xml b/basic/jdbc/src/main/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/jdbc/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/jdbc/src/main/resources/logback.xml b/basic/jdbc/src/main/resources/logback.xml deleted file mode 100644 index eee6b966..00000000 --- a/basic/jdbc/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - - diff --git a/basic/jms/src/main/resources/log4j.xml b/basic/jms/src/main/resources/log4j.xml index f391e2ed..89a1e58d 100644 --- a/basic/jms/src/main/resources/log4j.xml +++ b/basic/jms/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -24,5 +24,5 @@ - + \ No newline at end of file diff --git a/basic/jmx/src/test/resources/log4j.xml b/basic/jmx/src/test/resources/log4j.xml index 678b69b3..89a1e58d 100644 --- a/basic/jmx/src/test/resources/log4j.xml +++ b/basic/jmx/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/mail/src/main/resources/log4j.xml b/basic/mail/src/main/resources/log4j.xml index 4e5a8dc5..364cd818 100644 --- a/basic/mail/src/main/resources/log4j.xml +++ b/basic/mail/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -24,5 +24,5 @@ - + \ No newline at end of file diff --git a/basic/oddeven/src/main/resources/log4j.xml b/basic/oddeven/src/main/resources/log4j.xml index fd722913..bfeed04a 100644 --- a/basic/oddeven/src/main/resources/log4j.xml +++ b/basic/oddeven/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -28,5 +28,5 @@ - + \ No newline at end of file diff --git a/basic/quote/src/test/resources/log4j.xml b/basic/quote/src/test/resources/log4j.xml index f391e2ed..89a1e58d 100644 --- a/basic/quote/src/test/resources/log4j.xml +++ b/basic/quote/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -24,5 +24,5 @@ - + \ No newline at end of file diff --git a/basic/sftp/src/test/resources/log4j.properties b/basic/sftp/src/test/resources/log4j.properties deleted file mode 100644 index d85acd8e..00000000 --- a/basic/sftp/src/test/resources/log4j.properties +++ /dev/null @@ -1,10 +0,0 @@ -log4j.rootCategory=WARN, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n - -log4j.category.org.springframework=WARN -log4j.category.org.springframework.integration=DEBUG -log4j.category.org.springframework.integration.sftp=TRACE -log4j.category.org.springframework.integration.samples.sftp=TRACE diff --git a/basic/sftp/src/test/resources/log4j.xml b/basic/sftp/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/sftp/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 index 4c5f6f83..0368cdf8 100644 --- a/basic/tcp-client-server/src/main/resources/log4j.xml +++ b/basic/tcp-client-server/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/testing-examples/src/main/resources/log4j.xml b/basic/testing-examples/src/main/resources/log4j.xml index 1c6e74d9..0368cdf8 100644 --- a/basic/testing-examples/src/main/resources/log4j.xml +++ b/basic/testing-examples/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -28,5 +28,5 @@ - + \ No newline at end of file diff --git a/basic/twitter/src/test/resources/log4j.properties b/basic/twitter/src/test/resources/log4j.properties deleted file mode 100644 index 24eb71bb..00000000 --- a/basic/twitter/src/test/resources/log4j.properties +++ /dev/null @@ -1,8 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n - -log4j.category.org.springframework=WARN -log4j.category.org.springframework.integration=INFO diff --git a/basic/twitter/src/test/resources/log4j.xml b/basic/twitter/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/twitter/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/ws-inbound-gateway/src/test/resources/log4j.xml b/basic/ws-inbound-gateway/src/test/resources/log4j.xml index cf78c080..bcad1560 100644 --- a/basic/ws-inbound-gateway/src/test/resources/log4j.xml +++ b/basic/ws-inbound-gateway/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -24,5 +24,5 @@ - + \ No newline at end of file diff --git a/basic/ws-outbound-gateway/src/main/resources/log4j.xml b/basic/ws-outbound-gateway/src/main/resources/log4j.xml index 6cb1544e..17df6e28 100644 --- a/basic/ws-outbound-gateway/src/main/resources/log4j.xml +++ b/basic/ws-outbound-gateway/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/basic/xml/src/main/resources/log4j.xml b/basic/xml/src/main/resources/log4j.xml index f391e2ed..89a1e58d 100644 --- a/basic/xml/src/main/resources/log4j.xml +++ b/basic/xml/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + @@ -24,5 +24,5 @@ - + \ No newline at end of file diff --git a/basic/xmpp/src/test/resources/log4j.properties b/basic/xmpp/src/test/resources/log4j.properties deleted file mode 100644 index 24eb71bb..00000000 --- a/basic/xmpp/src/test/resources/log4j.properties +++ /dev/null @@ -1,8 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n - -log4j.category.org.springframework=WARN -log4j.category.org.springframework.integration=INFO diff --git a/basic/xmpp/src/test/resources/log4j.xml b/basic/xmpp/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/basic/xmpp/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/intermediate/async-gateway/src/test/resources/log4j.xml b/intermediate/async-gateway/src/test/resources/log4j.xml index 0b792903..97d2f11e 100644 --- a/intermediate/async-gateway/src/test/resources/log4j.xml +++ b/intermediate/async-gateway/src/test/resources/log4j.xml @@ -6,13 +6,13 @@ - + - + diff --git a/intermediate/dynamic-poller/src/main/resources/log4j.xml b/intermediate/dynamic-poller/src/main/resources/log4j.xml index 678b69b3..89a1e58d 100644 --- a/intermediate/dynamic-poller/src/main/resources/log4j.xml +++ b/intermediate/dynamic-poller/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/intermediate/errorhandling/src/test/resources/log4j.xml b/intermediate/errorhandling/src/test/resources/log4j.xml index 678b69b3..89a1e58d 100644 --- a/intermediate/errorhandling/src/test/resources/log4j.xml +++ b/intermediate/errorhandling/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/intermediate/file-processing/src/test/resources/log4j.xml b/intermediate/file-processing/src/test/resources/log4j.xml index c89960fb..6c7b7d46 100644 --- a/intermediate/file-processing/src/test/resources/log4j.xml +++ b/intermediate/file-processing/src/test/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/intermediate/multipart-http/src/main/resources/log4j.xml b/intermediate/multipart-http/src/main/resources/log4j.xml index b9d92d2c..5715f370 100644 --- a/intermediate/multipart-http/src/main/resources/log4j.xml +++ b/intermediate/multipart-http/src/main/resources/log4j.xml @@ -6,13 +6,13 @@ - + - + diff --git a/intermediate/rest-http/src/main/resources/log4j.properties b/intermediate/rest-http/src/main/resources/log4j.properties index d25b1ca9..96536975 100644 --- a/intermediate/rest-http/src/main/resources/log4j.properties +++ b/intermediate/rest-http/src/main/resources/log4j.properties @@ -4,7 +4,7 @@ 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 %p [%c] - <%m>%n +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 diff --git a/intermediate/rest-http/src/test/resources/log4j.properties b/intermediate/rest-http/src/test/resources/log4j.properties deleted file mode 100644 index 746f3016..00000000 --- a/intermediate/rest-http/src/test/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %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 -log4j.category.org.springframework=WARN -log4j.category.org.springframework.integration=INFO \ No newline at end of file diff --git a/intermediate/rest-http/src/test/resources/log4j.xml b/intermediate/rest-http/src/test/resources/log4j.xml new file mode 100644 index 00000000..19a9863d --- /dev/null +++ b/intermediate/rest-http/src/test/resources/log4j.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/intermediate/stored-procedures-derby/pom.xml b/intermediate/stored-procedures-derby/pom.xml index ea91ea0c..e0b8cbc4 100644 --- a/intermediate/stored-procedures-derby/pom.xml +++ b/intermediate/stored-procedures-derby/pom.xml @@ -1,122 +1,107 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - derby-stored-procedures - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + derby-stored-procedures + 2.1.0.BUILD-SNAPSHOT + jar - Samples (Intermediate) - Stored Procedures Derby - http://www.springsource.org/spring-integration + Samples (Intermediate) - Stored Procedures Derby + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.6.4 - 4.10 - + + UTF-8 + 2.1.0.RELEASE + 1.2.16 + 4.10 + - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/milestone + + - - - - maven-eclipse-plugin - 2.8 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.Main - - - - + + + + maven-eclipse-plugin + 2.8 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + org.springframework.integration.Main + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - - org.springframework.integration - spring-integration-jdbc - ${spring.integration.version} - + + org.springframework.integration + spring-integration-jdbc + ${spring.integration.version} + - + - - ch.qos.logback - logback-classic - 1.0.0 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + log4j + log4j + ${log4j.version} + - - org.apache.derby - derby - 10.8.2.2 - + + org.apache.derby + derby + 10.8.2.2 + - + diff --git a/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/Main.java b/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/Main.java index e206d857..0d068962 100644 --- a/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/Main.java +++ b/intermediate/stored-procedures-derby/src/main/java/org/springframework/integration/Main.java @@ -18,8 +18,7 @@ package org.springframework.integration; import java.util.List; import java.util.Scanner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.apache.log4j.Logger; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -36,7 +35,7 @@ import org.springframework.integration.service.CoffeeService; */ public final class Main { - private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); + private static final Logger LOGGER = Logger.getLogger(Main.class); private static final String LINE = "\n========================================================="; private static final String NEWLINE = "\n "; diff --git a/intermediate/stored-procedures-derby/src/main/resources/log4j.xml b/intermediate/stored-procedures-derby/src/main/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/intermediate/stored-procedures-derby/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/intermediate/stored-procedures-derby/src/main/resources/logback.xml b/intermediate/stored-procedures-derby/src/main/resources/logback.xml deleted file mode 100644 index eee6b966..00000000 --- a/intermediate/stored-procedures-derby/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - - diff --git a/intermediate/stored-procedures-oracle/pom.xml b/intermediate/stored-procedures-oracle/pom.xml index 85d3da5b..d1dc4bd2 100644 --- a/intermediate/stored-procedures-oracle/pom.xml +++ b/intermediate/stored-procedures-oracle/pom.xml @@ -1,122 +1,107 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - oracle-stored-procedures - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + oracle-stored-procedures + 2.1.0.BUILD-SNAPSHOT + jar - Samples (Intermediate) - Stored Procedures Oracle - http://www.springsource.org/spring-integration + Samples (Intermediate) - Stored Procedures Oracle + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.6.4 - 4.10 - + + UTF-8 + 2.1.0.RELEASE + 1.2.16 + 4.10 + - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/milestone + + - - - - maven-eclipse-plugin - 2.8 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.Main - - - - + + + + maven-eclipse-plugin + 2.8 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + org.springframework.integration.Main + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - - org.springframework.integration - spring-integration-jdbc - ${spring.integration.version} - + + org.springframework.integration + spring-integration-jdbc + ${spring.integration.version} + - + - - ch.qos.logback - logback-classic - 1.0.0 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + log4j + log4j + ${log4j.version} + - - com.oracle - ojdbc6 - 11.2.0.3 - + + com.oracle + ojdbc6 + 11.2.0.3 + - + diff --git a/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/Main.java b/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/Main.java index ae802155..e28f88cc 100644 --- a/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/Main.java +++ b/intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/Main.java @@ -17,8 +17,7 @@ package org.springframework.integration; import java.util.Scanner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.apache.log4j.Logger; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -34,7 +33,7 @@ import org.springframework.integration.service.StringConversionService; */ public final class Main { - private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); + private static final Logger LOGGER = Logger.getLogger(Main.class); private Main() { } diff --git a/intermediate/stored-procedures-oracle/src/main/resources/log4j.xml b/intermediate/stored-procedures-oracle/src/main/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/intermediate/stored-procedures-oracle/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/intermediate/stored-procedures-oracle/src/main/resources/logback.xml b/intermediate/stored-procedures-oracle/src/main/resources/logback.xml deleted file mode 100644 index eee6b966..00000000 --- a/intermediate/stored-procedures-oracle/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - - diff --git a/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml b/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml index 136a0e95..19d26e5d 100644 --- a/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml +++ b/intermediate/tcp-client-server-multiplex/src/main/resources/log4j.xml @@ -6,7 +6,7 @@ - + diff --git a/intermediate/travel/src/test/resources/log4j.properties b/intermediate/travel/src/test/resources/log4j.properties deleted file mode 100644 index 978e3006..00000000 --- a/intermediate/travel/src/test/resources/log4j.properties +++ /dev/null @@ -1,11 +0,0 @@ -log4j.rootCategory=WARN, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n - - -log4j.category.org.springframework=WARN -# log4j.category.org.springframework.integration=DEBUG -# log4j.category.org.springframework.integration.jdbc=DEBUG -log4j.category.org.springframework.integration.samples=DEBUG diff --git a/intermediate/travel/src/test/resources/log4j.xml b/intermediate/travel/src/test/resources/log4j.xml new file mode 100644 index 00000000..40d94ca5 --- /dev/null +++ b/intermediate/travel/src/test/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file