diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java
index 625da7f108..78bf9e672a 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowDefinition.java
@@ -20,6 +20,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
+import java.util.Optional;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.function.Consumer;
@@ -42,6 +43,7 @@ import org.springframework.integration.channel.ReactiveChannel;
import org.springframework.integration.channel.interceptor.WireTap;
import org.springframework.integration.config.ConsumerEndpointFactoryBean;
import org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean;
+import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.core.GenericSelector;
import org.springframework.integration.core.MessageSelector;
import org.springframework.integration.dsl.channel.MessageChannelSpec;
@@ -412,7 +414,7 @@ public abstract class IntegrationFlowDefinition The full request {@link Message} will be logged.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public B log() {
return log(LoggingHandler.Level.INFO);
@@ -2374,6 +2377,7 @@ public abstract class IntegrationFlowDefinition The full request {@link Message} will be logged.
* @param level the {@link LoggingHandler.Level}.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public B log(LoggingHandler.Level level) {
return log(level, (String) null);
@@ -2386,6 +2390,7 @@ public abstract class IntegrationFlowDefinition The full request {@link Message} will be logged.
* @param category the logging category to use.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public B log(String category) {
return log(LoggingHandler.Level.INFO, category);
@@ -2399,6 +2404,7 @@ public abstract class IntegrationFlowDefinition the expected payload type.
* against the request {@link Message}.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public
B log(Function, Object> function) {
Assert.notNull(function);
@@ -2444,6 +2452,7 @@ public abstract class IntegrationFlowDefinition the expected payload type.
* against the request {@link Message}.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public
B log(LoggingHandler.Level level, Function, Object> function) {
return log(level, null, function);
@@ -2507,6 +2519,7 @@ public abstract class IntegrationFlowDefinition the expected payload type.
* against the request {@link Message}.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public
B log(String category, Function, Object> function) {
return log(LoggingHandler.Level.INFO, category, function);
@@ -2523,6 +2536,7 @@ public abstract class IntegrationFlowDefinition the expected payload type.
* against the request {@link Message}.
* @return the current {@link IntegrationFlowDefinition}.
+ * @see #wireTap(WireTapSpec)
*/
public
B log(LoggingHandler.Level level, String category, Function, Object> function) {
Assert.notNull(function);
@@ -2540,6 +2554,7 @@ public abstract class IntegrationFlowDefinition lastComponent = this.integrationComponents.stream().reduce((first, second) -> second);
+ if (lastComponent.get() instanceof WireTapSpec) {
+// channel(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME);
+ }
+
this.integrationFlow = new StandardIntegrationFlow(this.integrationComponents);
}
return this.integrationFlow;
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/WireTapSpec.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/WireTapSpec.java
index 7d13fda9ba..cbb297c21b 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/WireTapSpec.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/WireTapSpec.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.
@@ -16,7 +16,6 @@
package org.springframework.integration.dsl.channel;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@@ -104,10 +103,10 @@ public class WireTapSpec extends IntegrationComponentSpec
@Override
public Collection