Skip to content

Conversation

@artembilan
Copy link
Member

Related to: #7971

The FileReadingMessageSource has always had a feature to create a directory to scan on startup. After introducing an expression variant, such a logic is limited only for the ValueExpression as only this one comes with a static value.
The Java DSL has been changed to support a Supplier variant for an input directory. The Supplier does not always give us the same value; therefore, we cannot assume directory auto-creation on startup.

  • Fix FileInboundChannelAdapterSpec for the directory(Expression directoryExpression) instead of Supplier
  • Fix Files to use a ValueExpression for statically provided File directory

Related to: spring-projects#7971

The `FileReadingMessageSource` has always had a feature to create a directory to scan on startup.
After introducing an expression variant, such a logic is limited only for the `ValueExpression`
as only this one comes with a static value.
The Java DSL has been changed to support a `Supplier` variant for an input directory.
The `Supplier` does not always give us the same value; therefore, we cannot assume directory auto-creation on startup.

* Fix `FileInboundChannelAdapterSpec` for the `directory(Expression directoryExpression)` instead of `Supplier`
* Fix `Files` to use a `ValueExpression` for statically provided `File directory`
@artembilan artembilan added this to the 7.0.0 milestone Oct 22, 2025
@artembilan artembilan requested a review from cppwfs October 22, 2025 16:45
artembilan added a commit to spring-projects/spring-integration-samples that referenced this pull request Oct 22, 2025
* Make `ci-snapshot.yml` as scheduled for the night build
* Remove the `mkdirs()` in the `file-split-ftp` test as
the respective fix is coming in Spring Integration: spring-projects/spring-integration#10525
Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks for fixing this!

@cppwfs cppwfs merged commit b7d4a46 into spring-projects:main Oct 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants