-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-8626: Provide cleaner transform()
DSL
#8653
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
Conversation
I have a naming problem 😄 my new DSL method is So, is that NOTE: The change in not done yet.
I don't deprecate many other Thanks |
|
Yes, please. Thanks |
Fixes spring-projects#8626 * Add missed `transform(String beanName, @nullable String methodName)` API * Introduce a `TransformerSpec` to expose a strict API to configure transformer variants. * Introduce `transformWith(Consumer<TransformerSpec>)` as a single point of all possible transformer and its endpoint options * Deprecate those `IntegrationFlowDefinition.transform()` variants which are harder to configure as several lambda arguments This change will make Kotlin & Groovy DSL more readable and straightforward
* Add JavaDocs to `TransformerSpec` * Fix generic types for `BaseIntegrationFlowDefinition.transformWith()` - they make sense exactly on the `TransformerSpec.transformer()` only * Apply `transformWith()` for Groovy DSL * Introduce a new `ClassUtils.isLambda(Object candidate)` and add a check for Groovy `Closure` * Fix `GroovyIntegrationFlowDefinition.createConfigurerIfAny()` to propagate a `Consumer` argument down to the `Closure`
meaning of the class * Introduce `KotlinTransformerEndpointSpec` as an extension of the `TransformerEndpointSpec` to have an `inline fun <reified P> transformer(crossinline function: (P) -> Any)` for Kotlin style * Add `KotlinIntegrationFlowDefinition.transformWith(KotlinTransformerEndpointSpec)` * Deprecate Kotlin methods which are covered by the mentioned `transformWith()` * Fix tests to use new API * Mentioned the change in the doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; needs to be removed from Draft mode for merge.
Removed from draft mode - let me know if that is not what you intended. |
Yes. That is exactly what we need now. |
Fixes #8626
transform(String beanName, @Nullable String methodName)
APITransformerSpec
to expose a strict API to configure transformer variants.transformWith(Consumer<TransformerSpec>)
as a single point of all possible transformer and its endpoint optionsIntegrationFlowDefinition.transform()
variants which are harder to configure as several lambda argumentsThis change will make Kotlin & Groovy DSL more readable and straightforward