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 d8f126fba0..db4d9c6731 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
@@ -587,6 +587,21 @@ public abstract class IntegrationFlowDefinition the payload type - 'convert to'.
+ * @return the current {@link IntegrationFlowDefinition}.
+ * @since 5.1
+ * @see MethodInvokingTransformer
+ * @see LambdaMessageProcessor
+ */
+ public
B convert(Class
payloadType) {
+ return transform(payloadType, p -> p);
+ }
+
+
/**
* Populate the {@link MessageTransformingHandler} instance for the provided {@link GenericTransformer}
* for the specific {@code payloadType} to convert at runtime.
@@ -599,7 +614,7 @@ public abstract class IntegrationFlowDefinition B transform(Class
payloadType, GenericTransformer
genericTransformer) {
- return this.transform(payloadType, genericTransformer, null);
+ return transform(payloadType, genericTransformer, null);
}
/**
@@ -619,6 +634,25 @@ public abstract class IntegrationFlowDefinition the payload type - 'transform to'.
+ * @return the current {@link IntegrationFlowDefinition}.
+ * @since 5.1
+ * @see MethodInvokingTransformer
+ * @see LambdaMessageProcessor
+ * @see GenericEndpointSpec
+ */
+ public
B convert(Class
payloadType,
+ Consumer> endpointConfigurer) {
+
+ return transform(payloadType, p -> p, endpointConfigurer);
+ }
+
/**
* Populate the {@link MessageTransformingHandler} instance for the provided {@link GenericTransformer}
* for the specific {@code payloadType} to convert at runtime.
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java
index 0deef01ef0..067f1c175d 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/LambdaMessageProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2017 the original author or authors.
+ * Copyright 2016-2018 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,12 +25,10 @@ import java.util.concurrent.atomic.AtomicReference;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.core.convert.ConversionService;
-import org.springframework.core.convert.TypeDescriptor;
-import org.springframework.core.convert.support.DefaultConversionService;
-import org.springframework.integration.support.utils.IntegrationUtils;
+import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandlingException;
+import org.springframework.messaging.converter.MessageConverter;
import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;
@@ -48,11 +46,11 @@ public class LambdaMessageProcessor implements MessageProcessor