From c5ec2d94c6cf726b9b629e4c532dc5c71bdcb14d Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 26 Jun 2019 16:14:02 -0400 Subject: [PATCH] Remove double commas in docs for link syntax --- src/reference/asciidoc/chain.adoc | 2 +- src/reference/asciidoc/changes-2.1-2.2.adoc | 8 ++++---- src/reference/asciidoc/changes-4.3-5.0.adoc | 2 +- src/reference/asciidoc/configuration.adoc | 6 +++--- src/reference/asciidoc/content-enrichment.adoc | 6 +++--- src/reference/asciidoc/file.adoc | 6 +++--- src/reference/asciidoc/ftp.adoc | 10 +++++----- src/reference/asciidoc/functions-support.adoc | 2 +- src/reference/asciidoc/gateway.adoc | 4 ++-- src/reference/asciidoc/handler-advice.adoc | 4 ++-- src/reference/asciidoc/ip.adoc | 4 ++-- src/reference/asciidoc/jdbc.adoc | 8 ++++---- src/reference/asciidoc/message-store.adoc | 2 +- src/reference/asciidoc/message.adoc | 8 ++++---- src/reference/asciidoc/mongodb.adoc | 8 ++++---- src/reference/asciidoc/overview.adoc | 2 +- src/reference/asciidoc/redis.adoc | 8 ++++---- src/reference/asciidoc/router.adoc | 2 +- src/reference/asciidoc/scripting.adoc | 2 +- src/reference/asciidoc/security.adoc | 2 +- src/reference/asciidoc/service-activator.adoc | 4 ++-- src/reference/asciidoc/sftp.adoc | 8 ++++---- src/reference/asciidoc/webflux.adoc | 2 +- 23 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/reference/asciidoc/chain.adoc b/src/reference/asciidoc/chain.adoc index 86709f103e..90afd00434 100644 --- a/src/reference/asciidoc/chain.adoc +++ b/src/reference/asciidoc/chain.adoc @@ -121,7 +121,7 @@ In this case, it is 'somethingChain$child#1'. Note, this transformer is not registered as a bean within the application context, so it does not get a `beanName`. However its `componentName` has a value that is useful for logging and other purposes. -The `id` attribute for `` elements lets them be eligible for <<./jmx.adoc#jmx-mbean-exporter,,JMX export>>, and they are trackable in the <<./message-history.adoc#message-history,,message history>>. +The `id` attribute for `` elements lets them be eligible for <<./jmx.adoc#jmx-mbean-exporter,JMX export>>, and they are trackable in the <<./message-history.adoc#message-history,message history>>. You can access them from the `BeanFactory` by using the appropriate bean name, as discussed earlier. TIP: It is useful to provide an explicit `id` attribute on `` elements to simplify the identification of sub-components in logs and to provide access to them from the `BeanFactory` etc. diff --git a/src/reference/asciidoc/changes-2.1-2.2.adoc b/src/reference/asciidoc/changes-2.1-2.2.adoc index ee81e19ea1..e6c5bace2a 100644 --- a/src/reference/asciidoc/changes-2.1-2.2.adoc +++ b/src/reference/asciidoc/changes-2.1-2.2.adoc @@ -27,10 +27,10 @@ For more information, see <<./mongodb.adoc#mongodb-outbound-channel-adapter,Mong Spring Integration now includes components for the Java Persistence API (JPA) for retrieving and persisting JPA entity objects. The JPA Adapter includes the following components: -* <<./jpa.adoc#jpa-inbound-channel-adapter,,Inbound channel adapter>> -* <<./jpa.adoc#jpa-outbound-channel-adapter,,Outbound channel adapter>> -* <<./jpa.adoc#jpa-updating-outbound-gateway,,Updating outbound gateway>> -* <<./jpa.adoc#jpa-retrieving-outbound-gateway,,Retrieving outbound gateway>> +* <<./jpa.adoc#jpa-inbound-channel-adapter,Inbound channel adapter>> +* <<./jpa.adoc#jpa-outbound-channel-adapter,Outbound channel adapter>> +* <<./jpa.adoc#jpa-updating-outbound-gateway,Updating outbound gateway>> +* <<./jpa.adoc#jpa-retrieving-outbound-gateway,Retrieving outbound gateway>> For more information, see <<./jpa.adoc#jpa,JPA Support>>. diff --git a/src/reference/asciidoc/changes-4.3-5.0.adoc b/src/reference/asciidoc/changes-4.3-5.0.adoc index 9dfa8a7f2e..16762c0f00 100644 --- a/src/reference/asciidoc/changes-4.3-5.0.adoc +++ b/src/reference/asciidoc/changes-4.3-5.0.adoc @@ -129,7 +129,7 @@ See <<./jms.adoc#jms,JMS Support>> for more information. ===== Mail Changes Some inconsistencies with rendering IMAP mail content have been resolved. -See <<./mail.adoc#imap-format-important,,the note in the "`Mail-receiving Channel Adapter`" section>> for more information. +See <<./mail.adoc#imap-format-important,the note in the "`Mail-receiving Channel Adapter`" section>> for more information. ===== Feed Changes diff --git a/src/reference/asciidoc/configuration.adoc b/src/reference/asciidoc/configuration.adoc index a6606c2a2b..d71ee8b66e 100644 --- a/src/reference/asciidoc/configuration.adoc +++ b/src/reference/asciidoc/configuration.adoc @@ -152,7 +152,7 @@ The next section describes what happens if exceptions occur within the asynchron [[namespace-errorhandler]] === Error Handling -As described in the <<./overview.adoc#overview,,overview>> at the very beginning of this manual, one of the main motivations behind a message-oriented framework such as Spring Integration is to promote loose coupling between components. +As described in the <<./overview.adoc#overview,overview>> at the very beginning of this manual, one of the main motivations behind a message-oriented framework such as Spring Integration is to promote loose coupling between components. The message channel plays an important role, in that producers and consumers do not have to know about each other. However, the advantages also have some drawbacks. Some things become more complicated in a loosely coupled environment, and one example is error handling. @@ -210,7 +210,7 @@ Starting with version 4.3.10, Spring Integration provides the `ErrorMessagePubli You can use them as a general mechanism for publishing `ErrorMessage` instances. You can call or extend them in any error handling scenarios. The `ErrorMessageSendingRecoverer` extends this class as a `RecoveryCallback` implementation that can be used with retry, such as the -<<./handler-advice.adoc#retry-advice,, `RequestHandlerRetryAdvice`>>. +<<./handler-advice.adoc#retry-advice,`RequestHandlerRetryAdvice`>>. The `ErrorMessageStrategy` is used to build an `ErrorMessage` based on the provided exception and an `AttributeAccessor` context. It can be injected into any `MessageProducerSupport` or `MessagingGatewaySupport`. The `requestMessage` is stored under `ErrorMessageUtils.INPUT_MESSAGE_CONTEXT_KEY` in the `AttributeAccessor` context. @@ -415,7 +415,7 @@ The processing of these annotations creates the same beans as the corresponding See <>. The bean names are generated from the following pattern: `[componentName].[methodName].[decapitalizedAnnotationClassShortName]` (for example, for the preceding example the bean name is `thingService.otherThing.serviceActivator`) for the `AbstractEndpoint` and the same name with an additional `.handler` (`.source`) suffix for the `MessageHandler` (`MessageSource`) bean. -The `MessageHandler` instances (`MessageSource` instances) are also eligible to be tracked by <<./message-history.adoc#message-history,, the message history>>. +The `MessageHandler` instances (`MessageSource` instances) are also eligible to be tracked by <<./message-history.adoc#message-history,the message history>>. Starting with version 4.0, all messaging annotations provide `SmartLifecycle` options (`autoStartup` and `phase`) to allow endpoint lifecycle control on application context initialization. They default to `true` and `0`, respectively. diff --git a/src/reference/asciidoc/content-enrichment.adoc b/src/reference/asciidoc/content-enrichment.adoc index 2fd555f530..5363571ce6 100644 --- a/src/reference/asciidoc/content-enrichment.adoc +++ b/src/reference/asciidoc/content-enrichment.adoc @@ -11,9 +11,9 @@ The Spring Integration `Core` module includes two enrichers: It also includes three adapter-specific header enrichers: -* <<./xml.adoc#xml-xpath-header-enricher,,XPath Header Enricher (XML Module)>> -* <<./mail.adoc#mail-namespace,,Mail Header Enricher (Mail Module)>> -* <<./xmpp.adoc#xmpp-message-outbound-channel-adapter,,XMPP Header Enricher (XMPP Module)>> +* <<./xml.adoc#xml-xpath-header-enricher,XPath Header Enricher (XML Module)>> +* <<./mail.adoc#mail-namespace,Mail Header Enricher (Mail Module)>> +* <<./xmpp.adoc#xmpp-message-outbound-channel-adapter,XMPP Header Enricher (XMPP Module)>> See the adapter-specific sections of this reference manual to learn more about those adapters. diff --git a/src/reference/asciidoc/file.adoc b/src/reference/asciidoc/file.adoc index 8dbb5a5e52..69e66b1788 100644 --- a/src/reference/asciidoc/file.adoc +++ b/src/reference/asciidoc/file.adoc @@ -608,7 +608,7 @@ By default, they append `.writing` to the file name and remove it when the trans Another common technique is to write a second "`marker`" file to indicate that the file transfer is complete. In this scenario, you should not consider `somefile.txt` (for example) to be available for use until `somefile.txt.complete` is also present. Spring Integration version 5.0 introduced new filters to support this mechanism. -Implementations are provided for the file system (`FileSystemMarkerFilePresentFileListFilter`), <<./ftp.adoc#ftp-incomplete,, FTP>> and <<./sftp.adoc#sftp-incomplete,, SFTP>>. +Implementations are provided for the file system (`FileSystemMarkerFilePresentFileListFilter`), <<./ftp.adoc#ftp-incomplete,FTP>> and <<./sftp.adoc#sftp-incomplete,SFTP>>. They are configurable such that the marker file can have any name, although it is usually related to the file being transferred. See the https://docs.spring.io/spring-integration/api/org/springframework/integration/file/filters/FileSystemMarkerFilePresentFileListFilter.html[Javadoc] for more information. @@ -950,7 +950,7 @@ It is often better to use a sequence of transformers than to put all transformat In that case the `File` to `byte[]` conversion might be a logical first step. `FileToStringTransformer` extends `AbstractFilePayloadTransformer` convert a `File` object to a `String`. -If nothing else, this can be useful for debugging (consider using it with a <<./channel.adoc#channel-wiretap,,wire tap>>). +If nothing else, this can be useful for debugging (consider using it with a <<./channel.adoc#channel-wiretap,wire tap>>). To configure file-specific transformers, you can use the appropriate elements from the file namespace, as the following example shows: @@ -1057,7 +1057,7 @@ This line is not included in the sequence header (if `applySequence` is true) no If a file contains only the header line, the file is treated as empty and, therefore, only `FileMarker` instances are emitted during splitting (if markers are enabled -- otherwise, no messages are emitted). By default (if no header name is set), the first line is considered to be data and becomes the payload of the first emitted message. -If you need more complex logic about header extraction from the file content (not first line, not the whole content of the line, not one particular header, and so on), consider using <<./content-enrichment.adoc#header-enricher,, header enricher>> ahead of the `FileSplitter`. +If you need more complex logic about header extraction from the file content (not first line, not the whole content of the line, not one particular header, and so on), consider using <<./content-enrichment.adoc#header-enricher,header enricher>> ahead of the `FileSplitter`. Note that the lines that have been moved to the headers might be filtered downstream from the normal content process. ==== Configuring with Java Configuration diff --git a/src/reference/asciidoc/ftp.adoc b/src/reference/asciidoc/ftp.adoc index b5b1c364f9..0f4e5cd577 100644 --- a/src/reference/asciidoc/ftp.adoc +++ b/src/reference/asciidoc/ftp.adoc @@ -354,7 +354,7 @@ The default `MetadataStore` is a `SimpleMetadataStore`, which stores state in me Since version 4.1.5, these filters have a new property (`flushOnUpdate`) that causes them to flush the metadata store on every update (if the store implements `Flushable`). -IMPORTANT: Further, if you use a distributed `MetadataStore` (such as <<./redis.adoc#redis-metadata-store,,Redis>> or <<./gemfire.adoc#gemfire-metadata-store,,GemFire>>), you can have multiple instances of the same adapter or application and be sure that each file is processed only once. +IMPORTANT: Further, if you use a distributed `MetadataStore` (such as <<./redis.adoc#redis-metadata-store,Redis>> or <<./gemfire.adoc#gemfire-metadata-store,GemFire>>), you can have multiple instances of the same adapter or application and be sure that each file is processed only once. The actual local filter is a `CompositeFileListFilter` that contains the supplied filter and a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`). Files are downloaded with this suffix (the default is `.writing`), and the file is renamed to its final name when the transfer is complete, making it 'visible' to the filter. @@ -805,7 +805,7 @@ When all files are consumed, the remote fetch is attempted again, to pick up any IMPORTANT: When you deploy multiple instances of an application, we recommend a small `max-fetch-size`, to avoid one instance "`grabbing`" all the files and starving other instances. Another use for `max-fetch-size` is if you want to stop fetching remote files but continue to process files that have already been fetched. -Setting the `maxFetchSize` property on the `MessageSource` (programmatically, with JMX, or with a <<./control-bus.adoc#control-bus,,control bus>>) effectively stops the adapter from fetching more files but lets the poller continue to emit messages for files that have previously been fetched. +Setting the `maxFetchSize` property on the `MessageSource` (programmatically, with JMX, or with a <<./control-bus.adoc#control-bus,control bus>>) effectively stops the adapter from fetching more files but lets the poller continue to emit messages for files that have previously been fetched. If the poller is active when the property is changed, the change takes effect on the next poll. Starting with version 5.1, the synchronizer can be provided with a `Comparator`. @@ -1068,10 +1068,10 @@ The `file_remoteDirectory` header provides the remote directory name, and the `f The message payload resulting from a `get` operation is a `File` object that represents the retrieved file or an `InputStream` when you use the `-stream` option. The `-stream` option allows retrieving the file as a stream. -For text files, a common use case is to combine this operation with a <<./file.adoc#file-splitter,,file splitter>> or a <<./transformer.adoc#stream-transformer,,stream transformer>>. +For text files, a common use case is to combine this operation with a <<./file.adoc#file-splitter,file splitter>> or a <<./transformer.adoc#stream-transformer,stream transformer>>. When consuming remote files as streams, you are responsible for closing the `Session` after the stream is consumed. For convenience, the `Session` is provided in the `closeableResource` header, which you can access with a convenience method on `IntegrationMessageHeaderAccessor` -The following example shows how to do use the covenience method: +The following example shows how to use the convenience method: ==== [source, java] @@ -1083,7 +1083,7 @@ if (closeable != null) { ---- ==== -Framework components such as the <<./file.adoc#file-splitter,,file splitter>> and the <<./transformer.adoc#stream-transformer,,stream transformer>> automatically close the session after the data is transferred. +Framework components such as the <<./file.adoc#file-splitter,file splitter>> and the <<./transformer.adoc#stream-transformer,stream transformer>> automatically close the session after the data is transferred. The following example shows how to consume a file as a stream: diff --git a/src/reference/asciidoc/functions-support.adoc b/src/reference/asciidoc/functions-support.adoc index aea8194db7..d71457027c 100644 --- a/src/reference/asciidoc/functions-support.adoc +++ b/src/reference/asciidoc/functions-support.adoc @@ -3,7 +3,7 @@ Starting with version 5.1, Spring Integration provides direct support for interfaces in the `java.util.function` package. All messaging endpoints, (Service Activator, Transformer, Filter, etc.) can now refer to `Function` (or `Consumer`) beans. -The <<./configuration.adoc#annotations,,Messaging Annotations>> can be applied directly on these beans similar to regular `MessageHandler` definitions. +The <<./configuration.adoc#annotations,Messaging Annotations>> can be applied directly on these beans similar to regular `MessageHandler` definitions. For example if you have this `Function` bean definition: diff --git a/src/reference/asciidoc/gateway.adoc b/src/reference/asciidoc/gateway.adoc index 6ebd853651..880318f52e 100644 --- a/src/reference/asciidoc/gateway.adoc +++ b/src/reference/asciidoc/gateway.adoc @@ -46,7 +46,7 @@ It lets you configure an interface as a service, as the following example shows: With this configuration defined, the `cafeService` can now be injected into other beans, and the code that invokes the methods on that proxied instance of the `Cafe` interface has no awareness of the Spring Integration API. The general approach is similar to that of Spring Remoting (RMI, HttpInvoker, and so on). -See the <<./samples.adoc#samples,,"`Samples`">> Appendix for an example that uses the `gateway` element (in the Cafe demo). +See the <<./samples.adoc#samples,"`Samples`">> Appendix for an example that uses the `gateway` element (in the Cafe demo). The defaults in the preceding configuration are applied to all methods on the gateway interface. If a reply timeout is not specified, the calling thread waits indefinitely for a reply. @@ -79,7 +79,7 @@ By defining a `default-reply-channel` you can point to a channel of your choosin In this case, that is a `publish-subscribe-channel`. The gateway creates a bridge from it to the temporary, anonymous reply channel that is stored in the header. -You might also want to explicitly provide a reply channel for monitoring or auditing through an interceptor (for example, <<./channel.adoc#channel-wiretap,, wiretap>>). +You might also want to explicitly provide a reply channel for monitoring or auditing through an interceptor (for example, <<./channel.adoc#channel-wiretap,wiretap>>). To configure a channel interceptor, you need a named channel. [[gateway-configuration-annotations]] diff --git a/src/reference/asciidoc/handler-advice.adoc b/src/reference/asciidoc/handler-advice.adoc index 604e7c2ccf..431ac278ca 100644 --- a/src/reference/asciidoc/handler-advice.adoc +++ b/src/reference/asciidoc/handler-advice.adoc @@ -682,9 +682,9 @@ The following example shows `` in use: ---- -If you are familiar with the <<./jpa.adoc#jpa,, JPA integration components>>, such a configuration is not new, but now we can start a transaction from any point in our flow -- not only from the `` or a message-driven channel adapter such as <<./jms.adoc#jms-message-driven-channel-adapter,, JMS>>. +If you are familiar with the <<./jpa.adoc#jpa,JPA integration components>>, such a configuration is not new, but now we can start a transaction from any point in our flow -- not only from the `` or a message-driven channel adapter such as <<./jms.adoc#jms-message-driven-channel-adapter,JMS>>. -Java configuration can be simplified by using the `TransactionInterceptorBuilder`, and the result bean name can be used in the <<./configuration.adoc#annotations,, messaging annotations>> `adviceChain` attribute, as the following example shows: +Java configuration can be simplified by using the `TransactionInterceptorBuilder`, and the result bean name can be used in the <<./configuration.adoc#annotations,messaging annotations>> `adviceChain` attribute, as the following example shows: [source,java] ---- diff --git a/src/reference/asciidoc/ip.adoc b/src/reference/asciidoc/ip.adoc index b8019c5143..faa93bef08 100644 --- a/src/reference/asciidoc/ip.adoc +++ b/src/reference/asciidoc/ip.adoc @@ -636,7 +636,7 @@ The following example shows how to configure a connection interceptor factory ch === TCP Connection Events Beginning with version 3.0, changes to `TcpConnection` instances are reported by `TcpConnectionEvent` instances. -`TcpConnectionEvent` is a subclass of `ApplicationEvent` and can thus be received by any `ApplicationListener` defined in the `ApplicationContext` -- for example <<./event.adoc#appevent-inbound,,an event inbound channel adapter>>. +`TcpConnectionEvent` is a subclass of `ApplicationEvent` and can thus be received by any `ApplicationListener` defined in the `ApplicationContext` -- for example <<./event.adoc#appevent-inbound,an event inbound channel adapter>>. `TcpConnectionEvents` have the following properties: @@ -743,7 +743,7 @@ Two additional attributes support this mechanism. The `retry-interval` specifies (in milliseconds) how often the framework attempts to reconnect after a connection failure. The `scheduler` supplies a `TaskScheduler` to schedule the connection attempts and to test that the connection is still active. -If you don't provide a scheduler, the framework's default <<./configuration.adoc#namespace-taskscheduler,, taskScheduler>> bean is used. +If you don't provide a scheduler, the framework's default <<./configuration.adoc#namespace-taskscheduler,taskScheduler>> bean is used. For an outbound adapter, the connection is normally established when the first message is sent. The `client-mode="true"` on an outbound adapter causes the connection to be established when the adapter is started. diff --git a/src/reference/asciidoc/jdbc.adoc b/src/reference/asciidoc/jdbc.adoc index ed623b5ac3..27ee029782 100644 --- a/src/reference/asciidoc/jdbc.adoc +++ b/src/reference/asciidoc/jdbc.adoc @@ -1094,10 +1094,10 @@ You can use the `JdbcMetadataStore` to maintain the metadata state across applic This `MetadataStore` implementation can be used with adapters such as the following: -* <<./feed.adoc#feed-inbound-channel-adapter,,Feed inbound channel adapters>> -* <<./file.adoc#file-reading,,files>> -* <<./ftp.adoc#ftp-inbound,,FTP inbound channel adapters>> -* <<./sftp.adoc#sftp-inbound,,SFTP inbound channel adapters>> +* <<./feed.adoc#feed-inbound-channel-adapter,Feed inbound channel adapters>> +* <<./file.adoc#file-reading,File inbound channel adapters>> +* <<./ftp.adoc#ftp-inbound,FTP inbound channel adapters>> +* <<./sftp.adoc#sftp-inbound,SFTP inbound channel adapters>> To configure these adapters to use the `JdbcMetadataStore`, declare a Spring bean by using a bean name of `metadataStore`. The Feed inbound channel adapter and the feed inbound channel adapter both automatically pick up and use the declared `JdbcMetadataStore`, as the following example shows: diff --git a/src/reference/asciidoc/message-store.adoc b/src/reference/asciidoc/message-store.adoc index 4f9efad8a6..b830201482 100644 --- a/src/reference/asciidoc/message-store.adoc +++ b/src/reference/asciidoc/message-store.adoc @@ -13,7 +13,7 @@ Spring Integration provides support for the message store pattern by: * Providing several implementations of this interface * Exposing a `message-store` attribute on all components that have the capability to buffer messages so that you can inject any instance that implements the `MessageStore` interface. -Details on how to configure a specific message store implementation and how to inject a `MessageStore` implementation into a specific buffering component are described throughout the manual (see the specific component, such as <<./channel.adoc#channel-configuration-queuechannel,,QueueChannel>>, <<./aggregator.adoc#aggregator,,Aggregator>>, <<./delayer.adoc#delayer,,Delayer>>, and others). +Details on how to configure a specific message store implementation and how to inject a `MessageStore` implementation into a specific buffering component are described throughout the manual (see the specific component, such as <<./channel.adoc#channel-configuration-queuechannel,QueueChannel>>, <<./aggregator.adoc#aggregator,Aggregator>>, <<./delayer.adoc#delayer,Delayer>>, and others). The following pair of examples show how to add a reference to a message store for a `QueueChannel` and for an aggregator: .QueueChannel diff --git a/src/reference/asciidoc/message.adoc b/src/reference/asciidoc/message.adoc index 2747e2e60c..822007e80b 100644 --- a/src/reference/asciidoc/message.adoc +++ b/src/reference/asciidoc/message.adoc @@ -244,13 +244,13 @@ This can be useful when you would like do not populate some out-of-the-box heade When you try to build a new message using `MessageBuilder`, this kind of header is ignored and a particular `INFO` message is emitted to logs. -Starting with version 5.0, <<./gateway.adoc#gateway,,Messaging Gateway>>, <<./content-enrichment.adoc#header-enricher,,Header Enricher>>, <<./content-enrichment.adoc#payload-enricher,,Content Enricher>> and <<./transformer.adoc#header-filter,,Header Filter>> do not let you configure the `MessageHeaders.ID` and `MessageHeaders.TIMESTAMP` header names when `DefaultMessageBuilderFactory` is used, and they throw `BeanInitializationException`. +Starting with version 5.0, <<./gateway.adoc#gateway,Messaging Gateway>>, <<./content-enrichment.adoc#header-enricher,Header Enricher>>, <<./content-enrichment.adoc#payload-enricher,Content Enricher>> and <<./transformer.adoc#header-filter,Header Filter>> do not let you configure the `MessageHeaders.ID` and `MessageHeaders.TIMESTAMP` header names when `DefaultMessageBuilderFactory` is used, and they throw `BeanInitializationException`. [[header-propagation]] ===== Header Propagation -When messages are processed (and modified) by message-producing endpoints (such as a <<./service-activator.adoc#service-activator,,service activator>>), in general, inbound headers are propagated to the outbound message. -One exception to this is a <<./transformer.adoc#transformer,,transformer>>, when a complete message is returned to the framework. +When messages are processed (and modified) by message-producing endpoints (such as a <<./service-activator.adoc#service-activator,service activator>>), in general, inbound headers are propagated to the outbound message. +One exception to this is a <<./transformer.adoc#transformer,transformer>>, when a complete message is returned to the framework. In that case, the user code is responsible for the entire outbound message. When a transformer just returns the payload, the inbound headers are propagated. Also, a header is only propagated if it does not already exist in the outbound message, letting you change header values as needed. @@ -268,7 +268,7 @@ In that case, the service activator behaves the same way as a transformer and an The `notPropagatedHeaders()` option is available in the `ConsumerEndpointSpec` for the Java DSL It is also available for XML configuration of the `` component as a `not-propagated-headers` attribute. -IMPORTANT: Header propagation suppression does not apply to those endpoints that do not modify the message, such as <<./bridge.adoc#bridge,,bridges>> and <<./router.adoc#router,,routers>>. +IMPORTANT: Header propagation suppression does not apply to those endpoints that do not modify the message, such as <<./bridge.adoc#bridge,bridges>> and <<./router.adoc#router,routers>>. [[message-implementations]] ==== Message Implementations diff --git a/src/reference/asciidoc/mongodb.adoc b/src/reference/asciidoc/mongodb.adoc index ad6342640c..556058d614 100644 --- a/src/reference/asciidoc/mongodb.adoc +++ b/src/reference/asciidoc/mongodb.adoc @@ -181,10 +181,10 @@ You can use the `MongoDbMetadataStore` to maintain metadata state across applica You can use this new `MetadataStore` implementation with adapters such as: -* <<./feed.adoc#feed-inbound-channel-adapter,,Feed>> -* <<./file.adoc#file-reading,,File>> -* <<./ftp.adoc#ftp-inbound,,FTP>> -* <<./sftp.adoc#sftp-inbound,,SFTP>> +* <<./feed.adoc#feed-inbound-channel-adapter,Feed>> +* <<./file.adoc#file-reading,File>> +* <<./ftp.adoc#ftp-inbound,FTP>> +* <<./sftp.adoc#sftp-inbound,SFTP>> To instruct these adapters to use the new `MongoDbMetadataStore`, declare a Spring bean with a bean name of `metadataStore`. The feed inbound channel adapter automatically picks up and use the declared `MongoDbMetadataStore`. diff --git a/src/reference/asciidoc/overview.adoc b/src/reference/asciidoc/overview.adoc index 8776dbe5c6..227c278584 100644 --- a/src/reference/asciidoc/overview.adoc +++ b/src/reference/asciidoc/overview.adoc @@ -340,7 +340,7 @@ There is one special case where a third bean is created: For architectural reaso This wrapper supports request handler advice handling and emits the normal 'produced no reply' debug log messages. Its bean name is the handler bean name plus `.wrapper` (when there is an `@EndpointId` -- otherwise, it is the normal generated handler name). -Similarly <<./polling-consumer.adoc#pollable-message-source,, Pollable Message Sources>> create two beans, a `SourcePollingChannelAdapter` (SPCA) and a `MessageSource`. +Similarly <<./polling-consumer.adoc#pollable-message-source, Pollable Message Sources>> create two beans, a `SourcePollingChannelAdapter` (SPCA) and a `MessageSource`. Consider the following XML configuration: diff --git a/src/reference/asciidoc/redis.adoc b/src/reference/asciidoc/redis.adoc index 791f4bd828..273decbcc4 100644 --- a/src/reference/asciidoc/redis.adoc +++ b/src/reference/asciidoc/redis.adoc @@ -426,10 +426,10 @@ You can use the `RedisMetadataStore` to maintain the state of a `MetadataStore` You can use this new `MetadataStore` implementation with adapters such as: -* <<./feed.adoc#feed-inbound-channel-adapter,,Feed>> -* <<./file.adoc#file-reading,,File>> -* <<./ftp.adoc#ftp-inbound,,FTP>> -* <<./sftp.adoc#sftp-inbound,,SFTP>> +* <<./feed.adoc#feed-inbound-channel-adapter,Feed>> +* <<./file.adoc#file-reading,File>> +* <<./ftp.adoc#ftp-inbound,FTP>> +* <<./sftp.adoc#sftp-inbound,SFTP>> To instruct these adapters to use the new `RedisMetadataStore`, declare a Spring bean named `metadataStore`. The Feed inbound channel adapter and the feed inbound channel adapter both automatically pick up and use the declared `RedisMetadataStore`. diff --git a/src/reference/asciidoc/router.adoc b/src/reference/asciidoc/router.adoc index 1704a71bd3..1032e56d70 100644 --- a/src/reference/asciidoc/router.adoc +++ b/src/reference/asciidoc/router.adoc @@ -22,7 +22,7 @@ Spring Integration provides the following routers: * <> * <> * <> -* <<./xml.adoc#xml-xpath-routing,,XPath Router (part of the XML module)>> +* <<./xml.adoc#xml-xpath-routing,XPath Router (part of the XML module)>> * <> * <> diff --git a/src/reference/asciidoc/scripting.adoc b/src/reference/asciidoc/scripting.adoc index 92629a03a2..bde880f1d6 100644 --- a/src/reference/asciidoc/scripting.adoc +++ b/src/reference/asciidoc/scripting.adoc @@ -50,7 +50,7 @@ The https://groovy-lang.org/[Groovy] and https://www.jruby.org[JRuby] projects p IMPORTANT: Various JSR223 language implementations have been developed by third parties. A particular implementation's compatibility with Spring Integration depends on how well it conforms to the specification and the implementer's interpretation of the specification. -TIP: If you plan to use Groovy as your scripting language, we recommended you use <<./groovy.adoc#groovy,,Spring-Integration's Groovy Support>> as it offers additional features specific to Groovy. +TIP: If you plan to use Groovy as your scripting language, we recommended you use <<./groovy.adoc#groovy,Spring-Integration's Groovy Support>> as it offers additional features specific to Groovy. However, this section is relevant as well. [[scripting-config]] diff --git a/src/reference/asciidoc/security.adoc b/src/reference/asciidoc/security.adoc index fe1062a92d..6ed0ca4e26 100644 --- a/src/reference/asciidoc/security.adoc +++ b/src/reference/asciidoc/security.adoc @@ -159,7 +159,7 @@ This means that, when the thread that processes the handed-off message finishes [NOTE] ==== -When working with an <<./gateway.adoc#async-gateway,,asynchronous gateway>>, you should use an appropriate `AbstractDelegatingSecurityContextSupport` implementation from Spring Security https://docs.spring.io/spring-security/site/docs/current/reference/html/servlet-webclient.html#concurrency[Concurrency Support], to let security context propagation be ensured over gateway invocation. +When working with an <<./gateway.adoc#async-gateway,asynchronous gateway>>, you should use an appropriate `AbstractDelegatingSecurityContextSupport` implementation from Spring Security https://docs.spring.io/spring-security/site/docs/current/reference/html/servlet-webclient.html#concurrency[Concurrency Support], to let security context propagation be ensured over gateway invocation. The following example shows how to do so: diff --git a/src/reference/asciidoc/service-activator.adoc b/src/reference/asciidoc/service-activator.adoc index 8805b53d05..60ff6b39e4 100644 --- a/src/reference/asciidoc/service-activator.adoc +++ b/src/reference/asciidoc/service-activator.adoc @@ -28,7 +28,7 @@ The preceding configuration selects all the methods from the `exampleHandler` th The target method for invocation at runtime is selected for each request message by their `payload` type or as a fallback to the `Message` type if such a method is present on target class. Starting with version 5.0, one service method can be marked with the `@org.springframework.integration.annotation.Default` as a fallback for all non-matching cases. -This can be useful when using <<./endpoint.adoc#content-type-conversion,, content-type conversion>> with the target method being invoked after conversion. +This can be useful when using <<./endpoint.adoc#content-type-conversion, content-type conversion>> with the target method being invoked after conversion. To delegate to an explicitly defined method of any object, you can add the `method` attribute, as the following example shows: @@ -172,7 +172,7 @@ In this case a new `Message` object is created and all the headers from a req This works the same way for most Spring Integration `MessageHandler` implementations, when interaction is based on a POJO method invocation. A complete `Message` object can also be returned from the method. -However keep in mind that, unlike <<./transformer.adoc#transformer,, transformers>>, for a Service Activator this message will be modified by copying the headers from the request message if they are not already present in the returned message. +However keep in mind that, unlike <<./transformer.adoc#transformer, transformers>>, for a Service Activator this message will be modified by copying the headers from the request message if they are not already present in the returned message. So, if your method parameter is a `Message` and you copy some, but not all, existing headers in your service method, they will reappear in the reply message. It is not a Service Activator responsibility to remove headers from a reply message and, pursuing the loosely-coupled principle, it is better to add a `HeaderFilter` in the integration flow. Alternatively, a Transformer can be used instead of a Service Activator but, in that case, when returning a full `Message` the method is completely responsible for the message, including copying request message headers (if needed). diff --git a/src/reference/asciidoc/sftp.adoc b/src/reference/asciidoc/sftp.adoc index 171d3e9431..0473af179e 100644 --- a/src/reference/asciidoc/sftp.adoc +++ b/src/reference/asciidoc/sftp.adoc @@ -805,7 +805,7 @@ When all are consumed, the remote fetch is attempted again, to pick up any new f IMPORTANT: When you deploy multiple instances of an application, we recommend setting a small `max-fetch-size`, to avoid one instance "`grabbing`" all the files and starving other instances. Another use for `max-fetch-size` is when you want to stop fetching remote files but continue to process files that have already been fetched. -Setting the `maxFetchSize` property on the `MessageSource` (programmatically, via JMX, or via a <<./control-bus.adoc#control-bus,, control bus>>) effectively stops the adapter from fetching more files but lets the poller continue to emit messages for files that have previously been fetched. +Setting the `maxFetchSize` property on the `MessageSource` (programmatically, via JMX, or via a <<./control-bus.adoc#control-bus, control bus>>) effectively stops the adapter from fetching more files but lets the poller continue to emit messages for files that have previously been fetched. If the poller is active when the property is changed, the change takes effect on the next poll. Starting with version 5.1, the synchronizer can be provided with a `Comparator`. @@ -1026,8 +1026,8 @@ The `file_remoteDirectory` header holds the remote directory, and the `file_remo The message payload resulting from a `get` operation is a `File` object representing the retrieved file. If you use the `-stream` option, the payload is an `InputStream` rather than a `File`. -For text files, a common use case is to combine this operation with a <<./file.adoc#file-splitter,,file splitter>> or a -<<./transformer.adoc#stream-transformer,,stream transformer>>. +For text files, a common use case is to combine this operation with a <<./file.adoc#file-splitter,file splitter>> or a +<<./transformer.adoc#stream-transformer,stream transformer>>. When consuming remote files as streams, you are responsible for closing the `Session` after the stream is consumed. For convenience, the `Session` is provided in the `closeableResource` header, and `IntegrationMessageHeaderAccessor` offers convenience method: @@ -1041,7 +1041,7 @@ if (closeable != null) { ---- ==== -Framework components, such as the <<./file.adoc#file-splitter,,File Splitter>> and <<./transformer.adoc#stream-transformer,,Stream Transformer>>, +Framework components, such as the <<./file.adoc#file-splitter,File Splitter>> and <<./transformer.adoc#stream-transformer,Stream Transformer>>, automatically close the session after the data is transferred. The following example shows how to consume a file as a stream: diff --git a/src/reference/asciidoc/webflux.adoc b/src/reference/asciidoc/webflux.adoc index 031333314d..03119ca063 100644 --- a/src/reference/asciidoc/webflux.adoc +++ b/src/reference/asciidoc/webflux.adoc @@ -137,7 +137,7 @@ Otherwise, it is treated as an `async` mode, and the `Mono` response is adapted The target payload of the output message depends on the `WebFluxRequestExecutingMessageHandler` configuration. The `setExpectedResponseType(Class)` or `setExpectedResponseTypeExpression(Expression)` identifies the target type of the response body element conversion. If `replyPayloadToFlux` is set to `true`, the response body is converted to a `Flux` with the provided `expectedResponseType` for each element, and this `Flux` is sent as the payload downstream. -Afterwards, you can use a <<./splitter.adoc#splitter,,splitter>> to iterate over this `Flux` in a reactive manner. +Afterwards, you can use a <<./splitter.adoc#splitter,splitter>> to iterate over this `Flux` in a reactive manner. In addition a `BodyExtractor` can be injected into the `WebFluxRequestExecutingMessageHandler` instead of the `expectedResponseType` and `replyPayloadToFlux` properties. It can be used for low-level access to the `ClientHttpResponse` and more control over body and HTTP headers conversion.