diff --git a/basic/kafka/src/main/java/org/springframework/integration/samples/kafka/Application.java b/basic/kafka/src/main/java/org/springframework/integration/samples/kafka/Application.java index fccd7350..48b33b55 100644 --- a/basic/kafka/src/main/java/org/springframework/integration/samples/kafka/Application.java +++ b/basic/kafka/src/main/java/org/springframework/integration/samples/kafka/Application.java @@ -23,7 +23,6 @@ import java.util.Properties; import org.I0Itec.zkclient.ZkClient; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.producer.ProducerConfig; -import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.serialization.StringDeserializer; import org.apache.kafka.common.serialization.StringSerializer; @@ -44,6 +43,8 @@ import org.springframework.kafka.core.DefaultKafkaProducerFactory; import org.springframework.kafka.core.KafkaTemplate; import org.springframework.kafka.core.ProducerFactory; import org.springframework.kafka.listener.KafkaMessageListenerContainer; +import org.springframework.kafka.listener.config.ContainerProperties; +import org.springframework.kafka.support.TopicPartitionInitialOffset; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHandler; @@ -123,7 +124,8 @@ public class Application { @Bean public KafkaMessageListenerContainer container() throws Exception { - return new KafkaMessageListenerContainer<>(consumerFactory(), new TopicPartition(this.topic, 0)); + return new KafkaMessageListenerContainer<>(consumerFactory(), + new ContainerProperties(new TopicPartitionInitialOffset(this.topic, 0))); } @Bean diff --git a/basic/web-sockets/src/main/java/org/springframework/integration/samples/websocket/standard/server/Application.java b/basic/web-sockets/src/main/java/org/springframework/integration/samples/websocket/standard/server/Application.java index adf8b77c..4194ffd0 100644 --- a/basic/web-sockets/src/main/java/org/springframework/integration/samples/websocket/standard/server/Application.java +++ b/basic/web-sockets/src/main/java/org/springframework/integration/samples/websocket/standard/server/Application.java @@ -135,7 +135,8 @@ public class Application { @ServiceActivator(inputChannel = "sendTimeChannel") public MessageHandler loggingChannelAdapter() { LoggingHandler loggingHandler = new LoggingHandler("info"); - loggingHandler.setExpression("'The time ' + payload + ' has been sent to the WebSocketSession ' + headers.simpSessionId"); + loggingHandler.setLogExpressionString( + "'The time ' + payload + ' has been sent to the WebSocketSession ' + headers.simpSessionId"); return loggingHandler; } diff --git a/basic/web-sockets/src/test/java/org/springframework/integration/samples/websocket/standard/ApplicationTests.java b/basic/web-sockets/src/test/java/org/springframework/integration/samples/websocket/standard/ApplicationTests.java index de3906b7..e6656b0c 100644 --- a/basic/web-sockets/src/test/java/org/springframework/integration/samples/websocket/standard/ApplicationTests.java +++ b/basic/web-sockets/src/test/java/org/springframework/integration/samples/websocket/standard/ApplicationTests.java @@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit; import org.junit.Test; import org.junit.runner.RunWith; -import org.springframework.boot.context.web.LocalServerPort; +import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/build.gradle b/build.gradle index 8538f912..fc3c8a4d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,16 @@ +buildscript { + repositories { + maven { url 'http://repo.spring.io/libs-snapshot' } + maven { url "http://repo.spring.io/libs-milestone" } + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion") + } +} +plugins { + id "org.sonarqube" version "1.2" +} + description = 'Spring Integration Samples' apply plugin: 'base' @@ -12,16 +25,6 @@ ext { linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-integration-samples.git' } -buildscript { - repositories { - maven { url 'http://repo.spring.io/libs-snapshot' } - maven { url "http://repo.spring.io/libs-milestone" } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion") - } -} - allprojects { group = 'org.springframework.integration.samples' @@ -196,9 +199,9 @@ subprojects { subproject -> slf4jVersion = '1.7.11' springIntegrationVersion = '4.3.0.RC1' springIntegrationDslVersion = '1.1.2.RELEASE' - springIntegrationKafkaVersion = '2.0.0.M1' + springIntegrationKafkaVersion = '2.0.0.RC1' springIntegrationSplunkVersion = '1.1.0.RELEASE' - springKafkaVersion = '1.0.0.M2' + springKafkaVersion = '1.0.0.RC1' springVersion = '4.3.0.RC2' springSecurityVersion = '4.0.2.RELEASE' springWebFlowVersion = '2.3.3.RELEASE' @@ -609,6 +612,8 @@ project('kafka') { exclude group: 'org.slf4j' } + compile "log4j:log4j:$log4jVersion" + testCompile 'org.springframework.boot:spring-boot-starter-test' } @@ -663,6 +668,8 @@ project('si4demo') { compile 'org.springframework.boot:spring-boot-starter-integration' compile "org.springframework.integration:spring-integration-mail" compile "org.springframework.integration:spring-integration-twitter" + compile "org.springframework.integration:spring-integration-http" + compile "org.springframework.integration:spring-integration-ip" compile "org.springframework.integration:spring-integration-java-dsl:$springIntegrationDslVersion" compile "javax.mail:javax.mail-api:$javaxMailVersion" compile "com.sun.mail:javax.mail:$javaxMailVersion" @@ -1337,10 +1344,8 @@ project('stomp-chat') { } } -apply plugin: 'sonar-runner' - -sonarRunner { - sonarProperties { +sonarqube { + properties { property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec" property "sonar.links.homepage", linkHomepage property "sonar.links.ci", linkCi @@ -1350,9 +1355,3 @@ sonarRunner { property "sonar.java.coveragePlugin", "jacoco" } } - -task wrapper(type: Wrapper) { - description = 'Generates gradlew[.bat] scripts' - gradleVersion = '2.5' - distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip" -} diff --git a/gradle.properties b/gradle.properties index e09c2c19..eff1f056 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ version=4.3.0.BUILD-SNAPSHOT -springBootVersion=1.4.0.M2 +springBootVersion=1.4.0.M3 +org.gradle.daemon=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 30d399d8..ca78035e 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7870c5a4..2c108a7d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jul 30 16:26:17 EDT 2015 +#Mon Jun 06 20:23:31 EDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-2.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip diff --git a/gradlew b/gradlew index 91a7e269..27309d92 100755 --- a/gradlew +++ b/gradlew @@ -6,12 +6,30 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/gradlew.bat b/gradlew.bat index aec99730..f6d5974e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,7 +46,7 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args