FileInbound DSL: Add recursive for convenience (#3495)
* FileInbound DSL: Add `recursive` for convenience Related to https://stackoverflow.com/questions/66171881/how-to-read-nested-txt-file-from-spring-integration-file The `FileInboundChannelAdapterSpec` can be configured with an external `DirectoryScanner`, but it sometimes becomes burden for end-users to extract a scanner bean and configure it with all the required file filters * Expose a `recursive(boolean)` option for better end-user experience * Rework `FileTests` for JUnit 5 * Mention a new option in the docs * * Restore accidentally removed code * Restore special symbols in the `FileTests` * Fix language in the docs according review
This commit is contained in:
@@ -6,8 +6,8 @@ Spring Integration's file support extends the Spring Integration core with a ded
|
||||
You need to include this dependency into your project:
|
||||
|
||||
====
|
||||
[source, xml, subs="normal", role="primary"]
|
||||
.Maven
|
||||
[source, xml, subs="normal"]
|
||||
----
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
@@ -15,9 +15,8 @@ You need to include this dependency into your project:
|
||||
<version>{project-version}</version>
|
||||
</dependency>
|
||||
----
|
||||
|
||||
[source, groovy, subs="normal", role="secondary"]
|
||||
.Gradle
|
||||
[source, groovy, subs="normal"]
|
||||
----
|
||||
compile "org.springframework.integration:spring-integration-file:{project-version}"
|
||||
----
|
||||
@@ -216,6 +215,8 @@ All other sub-directories inclusions and exclusions are based on the target `Fil
|
||||
For example, the `SimplePatternFileListFilter` filters out directories by default.
|
||||
See https://docs.spring.io/spring-integration/api/org/springframework/integration/file/filters/AbstractDirectoryAwareFileListFilter.html[`AbstractDirectoryAwareFileListFilter`] and its implementations for more information.
|
||||
|
||||
NOTE: Starting with version 5.5, the `FileInboundChannelAdapterSpec` of the Java DSL has a convenient `recursive(boolean)` option to use a `RecursiveDirectoryScanner` in the target `FileReadingMessageSource` instead of the default one.
|
||||
|
||||
[[file-namespace-support]]
|
||||
==== Namespace Support
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ In addition, `forRecursion=true` causes the full path to files to be used as the
|
||||
IMPORTANT: This means that existing keys in a persistent metadata store will not be found for files beneath the top level directory.
|
||||
For this reason, the property is `false` by default; this may change in a future release.
|
||||
|
||||
The `FileInboundChannelAdapterSpec` has now a convenient `recursive(boolean)` option instead of requiring an explicit reference to the `RecursiveDirectoryScanner`.
|
||||
|
||||
[[x5.5-mongodb]]
|
||||
==== MongoDb Changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user