diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java index 776d6f9f47..f5a538260c 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,7 +76,7 @@ public abstract class Transformers { } public static ObjectToMapTransformer toMap(JsonObjectMapper jsonObjectMapper, boolean shouldFlattenKeys) { - ObjectToMapTransformer transformer = new ObjectToMapTransformer(); + ObjectToMapTransformer transformer = new ObjectToMapTransformer(jsonObjectMapper); transformer.setShouldFlattenKeys(shouldFlattenKeys); return transformer; } diff --git a/src/reference/asciidoc/file.adoc b/src/reference/asciidoc/file.adoc index 44aa51e32d..2028fc70e0 100644 --- a/src/reference/asciidoc/file.adoc +++ b/src/reference/asciidoc/file.adoc @@ -409,7 +409,7 @@ public class FileReadingJavaApplication { .from(s -> s.file(new File(INBOUND_PATH)) .patternFilter("*.txt"), e -> e.poller(Pollers.fixedDelay(1000))) - .transform(Transformers.fileToString()) + .transform(Files.toStringTransformer()) .channel("processFileChannel") .get(); } diff --git a/src/reference/asciidoc/mail.adoc b/src/reference/asciidoc/mail.adoc index 4df677a055..a562788e43 100644 --- a/src/reference/asciidoc/mail.adoc +++ b/src/reference/asciidoc/mail.adoc @@ -98,7 +98,7 @@ This maps the following headers: - `mail_lineCount` - A line count (if available). - `mail_receivedDate` - The received date (if available). - `mail_size` - The mail size (if available). -- `mail_expunged` - A boolen indicating if the message is expunged. +- `mail_expunged` - A boolean indicating if the message is expunged. - `mail_raw` - A `MultiValueMap` containing all the mail headers and their values. - `mail_contentType` - The content type of the original mail message. - `contentType` - The payload content type (see below). @@ -146,7 +146,7 @@ and with the Java DSL: [source, java] ---- ... - .transform(Transformers.fromMail()) + .transform(Mail.toStringTransformer()) ... ----