diff --git a/build.gradle b/build.gradle index b052a841ac..5918aca033 100644 --- a/build.gradle +++ b/build.gradle @@ -102,9 +102,9 @@ ext { springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2021.0.1' springKafkaVersion = '2.7.1' springRetryVersion = '1.3.1' - springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.5.0-SNAPSHOT' + springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.5.0' springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.3.7' - springWsVersion = '3.1.0-SNAPSHOT' + springWsVersion = '3.1.0' tomcatVersion = '9.0.46' xmlUnitVersion = '2.8.2' xstreamVersion = '1.4.17' @@ -342,7 +342,7 @@ configure(javaProjects) { subproject -> checkstyle { configDirectory.set(rootProject.file('src/checkstyle')) - toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.41.1' + toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.42' } jar { diff --git a/src/reference/asciidoc/codec.adoc b/src/reference/asciidoc/codec.adoc index 14d8e6189e..4c407245c0 100644 --- a/src/reference/asciidoc/codec.adoc +++ b/src/reference/asciidoc/codec.adoc @@ -29,8 +29,7 @@ See the https://docs.spring.io/spring-integration/api/org/springframework/integr ==== `CodecMessageConverter` Certain endpoints (such as TCP and Redis) have no concept of message headers. -They support the use of a `MessageConverter`, and the `CodecMessageConverter` can be used to convert a message to or from a `byte[]` for -transmission. +They support the use of a `MessageConverter`, and the `CodecMessageConverter` can be used to convert a message to or from a `byte[]` for transmission. See the https://docs.spring.io/spring-integration/api/org/springframework/integration/codec/CodecMessageConverter.html[Javadoc] for more information. diff --git a/src/reference/asciidoc/kafka.adoc b/src/reference/asciidoc/kafka.adoc index b280eec022..e00c922449 100644 --- a/src/reference/asciidoc/kafka.adoc +++ b/src/reference/asciidoc/kafka.adoc @@ -4,6 +4,27 @@ === Overview Spring Integration for Apache Kafka is based on the https://projects.spring.io/spring-kafka/[Spring for Apache Kafka project]. + +You need to include this dependency into your project: + +==== +[source, xml, subs="normal", role="primary"] +.Maven +---- + + org.springframework.integration + spring-integration-kafka + {project-version} + +---- + +[source, groovy, subs="normal", role="secondary"] +.Gradle +---- +compile "org.springframework.integration:spring-integration-kafka:{project-version}" +---- +==== + It provides the following components: * <> @@ -373,7 +394,7 @@ Refer to the javadocs for available properties. [[max-poll-records]] By default, `max.poll.records` must be either explicitly set in the consumer factory, or it will be forced to 1 if the consumer factory is a `DefaultKafkaConsumerFactory`. -Starting with version 3.2, you can set the property `allowMultiFetch` to `true` to override this behavior. +You can set the property `allowMultiFetch` to `true` to override this behavior. IMPORTANT: You must poll the consumer within `max.poll.interval.ms` to avoid a rebalance. If you set `allowMultiFetch` to `true` you must process all the retrieved records, and poll again, within `max.poll.interval.ms`. @@ -663,7 +684,7 @@ public IntegrationFlow flowWithPollable(KafkaTemplate template, return IntegrationFlows.from(...) ... - .channel(Kafka.pollableChannel(template, source, "someTopic3").greoupId("group3")) + .channel(Kafka.pollableChannel(template, source, "someTopic3").groupId("group3")) .handle(..., e -> e.poller(...)) ... .get(); diff --git a/src/reference/asciidoc/mail.adoc b/src/reference/asciidoc/mail.adoc index 2fd5b5e6f3..5ff06f6f7d 100644 --- a/src/reference/asciidoc/mail.adoc +++ b/src/reference/asciidoc/mail.adoc @@ -6,8 +6,8 @@ This section describes how to work with mail messages in Spring Integration. You need to include this dependency into your project: ==== +[source, xml, subs="normal", role="primary"] .Maven -[source, xml, subs="normal"] ---- org.springframework.integration @@ -16,8 +16,8 @@ You need to include this dependency into your project: ---- +[source, groovy, subs="normal", role="secondary"] .Gradle -[source, groovy, subs="normal"] ---- compile "org.springframework.integration:spring-integration-mail:{project-version}" ---- @@ -177,20 +177,18 @@ To change this behavior and receive a `Multipart` object payload, set `embeddedP For content types that are unknown to the `DataHandler`, the contents are rendered as a `byte[]` with a `contentType` header of `application/octet-stream`. When you do not provide a header mapper, the message payload is the `MimeMessage` presented by `javax.mail`. -The framework provides a `MailToStringTransformer` that you can use to convert the message by using a strategy to convert the mail contents to a `String`. -This is also available by using the XML namespace, as the following example shows: +The framework provides a `MailToStringTransformer` that you can use to convert the message by using a strategy to convert the mail contents to a `String`: ==== -[source, xml] +[source, java, role="primary"] +.Java DSL ---- - + ... + .transform(Mail.toStringTransformer()) + ... ---- -==== - -The following example does the same thing with Java configuration: - -==== -[source, java] +[source, java, role="secondary"] +.Java ---- @Bean @Transformer(inputChannel="...", outputChannel="...") @@ -198,17 +196,18 @@ public Transformer transformer() { return new MailToStringTransformer(); } ---- -==== - -The following example does the same thing with the Java DSL: - -==== -[source, java] +[source, kotlin, role="secondary"] +.Kotlin ---- ... - .transform(Mail.toStringTransformer()) + transform(Mail.toStringTransformer()) ... ---- +[source, xml, role="secondary"] +.XML +---- + +---- ==== Starting with version 4.3, the transformer handles embedded `Part` instances (as well as `Multipart` instances, which were handled previously). diff --git a/src/reference/asciidoc/meta-data-store.adoc b/src/reference/asciidoc/meta-data-store.adoc index 78274569bd..aa12b669f4 100644 --- a/src/reference/asciidoc/meta-data-store.adoc +++ b/src/reference/asciidoc/meta-data-store.adoc @@ -32,8 +32,7 @@ The following example shows how to configure a 'PropertiesPersistingMetadataStor class="org.springframework.integration.metadata.PropertiesPersistingMetadataStore"/> ---- -Alternatively, you can provide your own implementation of the `MetadataStore` interface (for example, -`JdbcMetadataStore`) and configure it as a bean in the application context. +Alternatively, you can provide your own implementation of the `MetadataStore` interface (for example, `JdbcMetadataStore`) and configure it as a bean in the application context. Starting with version 4.0, `SimpleMetadataStore`, `PropertiesPersistingMetadataStore`, and `RedisMetadataStore` implement `ConcurrentMetadataStore`. These provide for atomic updates and can be used across multiple component or application instances. diff --git a/src/reference/asciidoc/samples.adoc b/src/reference/asciidoc/samples.adoc index 7fadf3844b..5b571d221c 100644 --- a/src/reference/asciidoc/samples.adoc +++ b/src/reference/asciidoc/samples.adoc @@ -578,7 +578,7 @@ The following listing configures the `xpath-router` that routes the messages: ==== [source,xml] ---- - +