From 8d1dd0b68db6dede8b9c04e1feef236a237c0693 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 27 May 2020 12:21:24 -0400 Subject: [PATCH] Some docs clean up --- src/reference/asciidoc/claim-check.adoc | 4 +-- .../asciidoc/content-enrichment.adoc | 8 ++--- src/reference/asciidoc/transformer.adoc | 34 +++---------------- 3 files changed, 9 insertions(+), 37 deletions(-) diff --git a/src/reference/asciidoc/claim-check.adoc b/src/reference/asciidoc/claim-check.adoc index 98c0478136..779e9f9493 100644 --- a/src/reference/asciidoc/claim-check.adoc +++ b/src/reference/asciidoc/claim-check.adoc @@ -47,7 +47,7 @@ The following listing provides an overview of all available parameters of an inc ==== [source,xml] ---- - + id="" <2> input-channel="" <3> message-store="messageStore" <4> @@ -112,7 +112,7 @@ The following listing provides an overview of all available parameters of an out ==== [source,xml] ---- - + id="" <2> input-channel="" <3> message-store="messageStore" <4> diff --git a/src/reference/asciidoc/content-enrichment.adoc b/src/reference/asciidoc/content-enrichment.adoc index 5363571ce6..e5e4abbcd9 100644 --- a/src/reference/asciidoc/content-enrichment.adoc +++ b/src/reference/asciidoc/content-enrichment.adoc @@ -314,11 +314,7 @@ Optional. <6> By default, the original message's payload is used as payload that is sent to the `request-channel`. By specifying a SpEL expression as the value for the `request-payload-expression` attribute, you can use a subset of the original payload, a header value, or any other resolvable SpEL expression as the basis for the payload that is sent to the request-channel. For the expression evaluation, the full message is available as the 'root object'. -For instance, the following SpEL expressions (among others) are possible: -* `payload.something` -* `headers.something` -* `new java.util.Date()` -* `'thing1' + 'thing2'` +For instance, the following SpEL expressions (among others) are possible: `payload.something`, `headers.something`, `new java.util.Date()`, `'thing1' + 'thing2'` <7> Channel where a reply message is expected. This is optional. Typically, the auto-generated temporary reply channel suffices. @@ -343,7 +339,7 @@ Optional. <12> Each `property` sub-element provides the name of a property (through the mandatory `name` attribute). That property should be settable on the target payload instance. Exactly one of the `value` or `expression` attributes must be provided as well -- the former for a literal value to set and the latter for a SpEL expression to be evaluated. -The root object of the evaluation context is the message that was returned from the flow initiated by this enricher -- the input message if there is no request channel or the application context (using the '@.' SpEL syntax). +The root object of the evaluation context is the message that was returned from the flow initiated by this enricher -- the input message if there is no request channel or the application context (using the `@.` SpEL syntax). Starting with version 4.0, when specifying a `value` attribute, you can also specify an optional `type` attribute. When the destination is a typed setter method, the framework coerces the value appropriately (as long as a `PropertyEditor`) exists to handle the conversion. If, however, the target payload is a `Map`, the entry is populated with the value without conversion. diff --git a/src/reference/asciidoc/transformer.adoc b/src/reference/asciidoc/transformer.adoc index fe1573605a..2c57d529f9 100644 --- a/src/reference/asciidoc/transformer.adoc +++ b/src/reference/asciidoc/transformer.adoc @@ -18,7 +18,7 @@ For more information on those transformers, see <<./xml.adoc#xml,XML Support - D ==== Configuring a Transformer with XML The `` element is used to create a message-transforming endpoint. -In addition to `input-channel` and `output-channel` attributes, it requires a ` attribute`. +In addition to `input-channel` and `output-channel` attributes, it requires a `ref` attribute. The `ref` may either point to an object that contains the `@Transformer` annotation on a single method (see <>), or it may be combined with an explicit method name value provided in the `method` attribute. ==== @@ -70,7 +70,7 @@ The following example shows how to use a SpEL expression: ---- + expression="payload.toUpperCase() + '- [' + T(System).currentTimeMillis() + ']'"/> ---- ==== @@ -99,7 +99,7 @@ Whereas that channel adapter only supports `String`, byte-array, or `java.io.Fil That works fine as long as the result of the `toString()` call is what you want to be written to the file. Otherwise, you can provide a custom POJO-based transformer by using the generic 'transformer' element shown previously. -TIP: When debugging, this transformer is not typically necessary, since the 'logging-channel-adapter' is capable of logging the message payload. +TIP: When debugging, this transformer is not typically necessary, since the `logging-channel-adapter` is capable of logging the message payload. See <<./channel.adoc#channel-wiretap,Wire Tap>> for more detail. [NOTE] @@ -122,7 +122,7 @@ For more sophistication (such as selection of the charset dynamically, at runtim ==== If you need to serialize an `Object` to a byte array or deserialize a byte array back into an `Object`, Spring Integration provides symmetrical serialization transformers. -These use standard Java serialization by default, but you can provide an implementation of Spring 3.0's serializer or seserializer strategies by using the 'serializer' and 'deserializer' attributes, respectively. +These use standard Java serialization by default, but you can provide an implementation of Spring 3.0's serializer or seserializer strategies by using the `serializer` and `deserializer` attributes, respectively. The following example shows to use Spring's serializer and deserializer: ==== @@ -194,7 +194,7 @@ public class Kid { ---- ==== -If you need to create a "`structured`" map, you can provide the 'flatten' attribute. +If you need to create a "`structured`" map, you can provide the `flatten` attribute. The default is 'true'. If you set it to 'false', the structure is a `Map` of `Map` objects. @@ -345,32 +345,8 @@ Beginning with version 3.0, the `object-mapper` attribute references an instance This abstraction lets multiple implementations of JSON mappers be used. Implementation that wraps https://github.com/FasterXML[Jackson 2] is provided, with the version being detected on the classpath. The class is `Jackson2JsonObjectMapper`, respectively. - -NOTE: The `BoonJsonObjectMapper` is deprecated in 5.2 since the library is out of support. ==== -[IMPORTANT] -==== -If you have requirements to use both Jackson and Boon in the same application, keep in mind that, before version 3.0, the JSON transformers used only Jackson 1.x. -From 4.1 on, the framework selects Jackson 2 by default. -Jackson 1.x is no longer supported by the framework internally. -However, you can still use it within your code by including the necessary library. -To avoid unexpected issues with JSON mapping features when you use annotations, you may need to apply annotations from both Jackson and Boon on domain classes, as the following example shows: - -[source,java] ----- -@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown=true) -public class Thing1 { - - @com.fasterxml.jackson.annotation.JsonProperty("thing1Thing2") - public Object thing2; - -} ----- -==== - -NOTE: Boon support has been deprecated since version 5.2. - You may wish to consider using a `FactoryBean` or a factory method to create the `JsonObjectMapper` with the required characteristics. The following example shows how to use such a factory: