Improve split() DSL (#8666)
* Introduce a `SplitterSpec` which can accept possible splitter variants: `expression`, `function`, `ref` etc. This way we are going to have a complex endpoint configuration only with a single method argument. * Use `SplitterSpec` in a newly introduced `splitWith()` * Deprecate those `split()` methods which use `SplitterEndpointSpec`. This method are complex enough because of their several arguments * Refactor some common `MessageHandler` options initialization into the `ConsumerEndpointSpec.doGet()` * Disable failing now `MethodInvokingMessageProcessorTests.testCollectionArgument()`: or Jackson problem, or fresh SF * Groovy DSL will be fixed in the separate PR: https://stackoverflow.com/questions/76595843/groovy-selects-a-defaultgroovymethods-split-instead-of-mine-one
This commit is contained in:
@@ -416,11 +416,12 @@ public class FileTests {
|
||||
.addFilter(new AcceptOnceFileListFilter<>())
|
||||
.addFilter(fileExpressionFileListFilter)),
|
||||
e -> e.poller(p -> p.fixedDelay(100)))
|
||||
.split(Files.splitter()
|
||||
.splitWith(s -> s
|
||||
.id("fileSplitter")
|
||||
.ref(Files.splitter()
|
||||
.markers()
|
||||
.charset(StandardCharsets.US_ASCII)
|
||||
.applySequence(true),
|
||||
e -> e.id("fileSplitter"))
|
||||
.applySequence(true)))
|
||||
.channel(c -> c.queue("fileSplittingResultChannel"))
|
||||
.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user