Commit 14f72bd
Expand Mail documentation with DSL examples
The Mail module documentation previously only showed XML configuration
examples. This update adds examples for Java, Java DSL, Kotlin DSL,
and Groovy DSL to help developers using these different configuration
styles.
Changes include:
- Outbound channel adapter configuration in all DSL flavors
- Header enricher examples for all supported languages
- Inbound adapters (both polling and IDLE) with DSL examples
- JavaMail properties configuration examples
- Search term strategy configuration examples
- Mail filter expression examples across all DSL types
- Transaction synchronization examples for all configurations
- Minor typo fix in SearchTerm documentation
- Minor grammar fixes
This makes the documentation more accessible to developers who prefer
annotation-based or DSL configuration over XML.
Note:
In some cases there is no DSL for Java, Kotlin, or Groovy.
This is because the sample is for a supporting bean of the DSL vs. the DSL itself.
Update Kotlin samples to be idiomatic
Code example changes:
- Expand outbound adapter examples to show complete `JavaMailSender`
bean configuration for Java, Java DSL, Kotlin DSL, and Groovy DSL
- Simplify Java examples by inlining return statements
- Add duplicate Groovy DSL example showing both credential styles
- Restructure IMAP idle adapter examples to use inline URI
configuration instead of separate receiver bean creation
- Remove complete mail flow examples from header enricher section,
keeping only enrichment examples
- Modify Kotlin DSL examples to use different patterns (`integrationFlow`
function vs `IntegrationFlow.from()`)
- Update Groovy Properties construction to use map constructor syntax
- Simplify Kotlin `imapMailInboundFlow` to remove explicit return type
- Replace phrasing around terms as "you" and "we"
- Groovy samples were updated but are not idiomatic of the language. Request assistance
Make Groovy mail DSL examples idiomatic
Update Groovy code examples in mail.adoc to follow idiomatic Groovy
patterns, remove Java-style verbosity, and fix syntax errors
introduced in previous commits. Changes include:
- Replace `IntegrationFlow.from().get()` with `integrationFlow {}` DSL
- Use `.with {}` builder pattern for adapter configuration
- Apply property-style setters (`shouldDeleteMessages true`)
- Remove explicit return types leveraging Groovy type inference
- Restore essential poller configuration for inbound adapters
- Use consistent property assignment style throughout examples
* Some language and code clean up in the `mail.adoc`1 parent fa6a79d commit 14f72bd
1 file changed
+802
-107
lines changed
0 commit comments