-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use contextual lambdas to configure batch artefacts #4818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @fmbenhassine, This looks like a great improvement! |
@kwondh5217 Sure! Thank you for your offer to help! I believe Spring Security pioneered this configuration approach in the portfolio, so you can take a look there for inspiration. |
Hi @fmbenhassine, thank you for your guidance earlier! I’d like to clarify the intended direction of the enhancement. From what I understand, the idea is not just to support lambda-based configuration in FlatFileItemReaderBuilder, but to establish a general DSL-style configuration approach across all ItemReader and ItemWriter builders. Would you recommend introducing a shared abstraction (e.g. a ConfigurerAwareBuilder base class similar to AbstractConfiguredSecurityBuilder in Spring Security) to support this pattern? Also, in terms of behavior: Should we throw an exception when both chaining and lambda styles are used? Or should we allow overriding? Or should we allow both and apply in order? I want to align with the broader design direction before proceeding. Thank you again for your support. |
I don't think we need new builders. My initial thinking was about adding new methods to existing builders that accept Here is also the original issue in Spring Security: spring-projects/spring-security#5557 So we can imagine new configuration specifications like |
Thanks for the detailed guidance @fmbenhassine ! I’ll share a draft PR soon for feedback. Appreciate your support! |
Hi @fmbenhassine, |
This request is about improving the builders of item readers and writers to use Lambdas for configuration options:
Current API:
Proposal:
cc @joshlong
The text was updated successfully, but these errors were encountered: