@@ -47,6 +47,7 @@ import org.springframework.integration.dsl.ResequencerSpec
4747import org.springframework.integration.dsl.RouterSpec
4848import org.springframework.integration.dsl.ScatterGatherSpec
4949import org.springframework.integration.dsl.SplitterEndpointSpec
50+ import org.springframework.integration.dsl.SplitterSpec
5051import org.springframework.integration.dsl.TransformerEndpointSpec
5152import org.springframework.integration.dsl.WireTapSpec
5253import org.springframework.integration.filter.MethodInvokingSelector
@@ -710,18 +711,47 @@ class GroovyIntegrationFlowDefinition {
710711 this
711712 }
712713
714+ /**
715+ * Populate the {@link DefaultMessageSplitter} with default options to the current integration flow position.
716+ */
717+ GroovyIntegrationFlowDefinition split () {
718+ this . delegate. split()
719+ this
720+ }
721+
713722 /**
714723 * Populate the {@link DefaultMessageSplitter} with provided options
715724 * to the current integration flow position.
716725 * Used with a Closure expression (optional).
717726 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
718727 * and for {@link DefaultMessageSplitter}.
728+ * @since 6.2
729+ * @see SplitterSpec
730+ */
731+ GroovyIntegrationFlowDefinition splitWith (
732+ @DelegatesTo (value = SplitterSpec , strategy = Closure .DELEGATE_FIRST )
733+ @ClosureParams (value = SimpleType .class, options = ' org.springframework.integration.dsl.SplitterSpec' )
734+ Closure<?> splitConfigurer ) {
735+
736+ this . delegate. splitWith createConfigurerIfAny(splitConfigurer)
737+ this
738+ }
739+
740+ /**
741+ * Populate the {@link DefaultMessageSplitter} with provided options
742+ * to the current integration flow position.
743+ * Used with a Closure expression.
744+ * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
745+ * and for {@link DefaultMessageSplitter}.
746+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
719747 * @see SplitterEndpointSpec
720748 */
749+ @Deprecated (since = ' 6.2' , forRemoval = true )
750+ @SuppressWarnings ([' removal' , ' deprecation' ])
721751 GroovyIntegrationFlowDefinition split (
722752 @DelegatesTo (value = SplitterEndpointSpec<DefaultMessageSplitter > , strategy = Closure .DELEGATE_FIRST )
723753 @ClosureParams (value = SimpleType .class, options = ' org.springframework.integration.dsl.SplitterEndpointSpec' )
724- Closure<?> endpointConfigurer = null ) {
754+ Closure<?> endpointConfigurer ) {
725755
726756 this . delegate. split createConfigurerIfAny(endpointConfigurer)
727757 this
@@ -733,7 +763,10 @@ class GroovyIntegrationFlowDefinition {
733763 * @param expression the splitter SpEL expression.
734764 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
735765 * and for {@link ExpressionEvaluatingSplitter}.
766+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
736767 */
768+ @Deprecated (since = ' 6.2' , forRemoval = true )
769+ @SuppressWarnings ([' removal' , ' deprecation' ])
737770 GroovyIntegrationFlowDefinition split (
738771 String expression ,
739772 @DelegatesTo (value = SplitterEndpointSpec<ExpressionEvaluatingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -752,7 +785,10 @@ class GroovyIntegrationFlowDefinition {
752785 * @param methodName the method to invoke.
753786 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
754787 * and for {@link MethodInvokingSplitter}.
788+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
755789 */
790+ @Deprecated (since = ' 6.2' , forRemoval = true )
791+ @SuppressWarnings ([' removal' , ' deprecation' ])
756792 GroovyIntegrationFlowDefinition split (
757793 Object service , String methodName = null ,
758794 @DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -772,7 +808,10 @@ class GroovyIntegrationFlowDefinition {
772808 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
773809 * and for {@link MethodInvokingSplitter}.
774810 * @see org.springframework.integration.dsl.SplitterEndpointSpec
811+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
775812 */
813+ @Deprecated (since = ' 6.2' , forRemoval = true )
814+ @SuppressWarnings ([' removal' , ' deprecation' ])
776815 GroovyIntegrationFlowDefinition split (
777816 String beanName , String methodName ,
778817 @DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -791,7 +830,10 @@ class GroovyIntegrationFlowDefinition {
791830 * @param messageProcessorSpec the splitter {@link MessageProcessorSpec}.
792831 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options
793832 * and for {@link MethodInvokingSplitter}.
833+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
794834 */
835+ @Deprecated (since = ' 6.2' , forRemoval = true )
836+ @SuppressWarnings ([' removal' , ' deprecation' ])
795837 GroovyIntegrationFlowDefinition split (
796838 MessageProcessorSpec<?> messageProcessorSpec ,
797839 @DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -811,8 +853,11 @@ class GroovyIntegrationFlowDefinition {
811853 * Conversion to this type will be attempted, if necessary.
812854 * @param splitter the splitter {@link Function}.
813855 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
814- * @param < P > the payload type or {@code Message.class }.
856+ * @param <P> the payload type or {@code Message.class }.
857+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
815858 */
859+ @Deprecated (since = ' 6.2' , forRemoval = true )
860+ @SuppressWarnings ([' removal' , ' deprecation' ])
816861 < P> GroovyIntegrationFlowDefinition split(
817862 Class<P> expectedType, Function<P, ?> splitter,
818863 @DelegatesTo (value = SplitterEndpointSpec<MethodInvokingSplitter > , strategy = Closure .DELEGATE_FIRST )
@@ -830,9 +875,12 @@ class GroovyIntegrationFlowDefinition {
830875 * flow position.
831876 * @param splitterMessageHandlerSpec the {@link MessageHandlerSpec} to populate.
832877 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
833- * @param < S > the {@link AbstractMessageSplitter}
878+ * @param <S> the {@link AbstractMessageSplitter}
879+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
834880 * @see org.springframework.integration.dsl.SplitterEndpointSpec
835881 */
882+ @Deprecated (since = ' 6.2' , forRemoval = true )
883+ @SuppressWarnings ([' removal' , ' deprecation' ])
836884 < S extends AbstractMessageSplitter > GroovyIntegrationFlowDefinition split(
837885 MessageHandlerSpec<?, S> splitterMessageHandlerSpec,
838886 @DelegatesTo (value = SplitterEndpointSpec<S> , strategy = Closure .DELEGATE_FIRST )
@@ -848,9 +896,12 @@ class GroovyIntegrationFlowDefinition {
848896 * flow position.
849897 * @param splitter the {@link AbstractMessageSplitter} to populate.
850898 * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options.
851- * @param < S > the {@link AbstractMessageSplitter}
899+ * @param <S> the {@link AbstractMessageSplitter}
900+ * @deprecated since 6.2 in favor of {@link #splitWith(groovy.lang.Closure)}
852901 * @see org.springframework.integration.dsl.SplitterEndpointSpec
853902 */
903+ @Deprecated (since = ' 6.2' , forRemoval = true )
904+ @SuppressWarnings ([' removal' , ' deprecation' ])
854905 < S extends AbstractMessageSplitter > GroovyIntegrationFlowDefinition split(
855906 S splitter,
856907 @DelegatesTo (value = SplitterEndpointSpec<S> , strategy = Closure .DELEGATE_FIRST )
0 commit comments