GH-499,498 Add support for SupplierExporter to control output content-type

- Add 'contentType' property to ExporterProperties to assist SupplierExporter with delegating it to function catalog
- Add additional logging and testing
- Change JsonMapper to abstract class providing special handling of conversion of Json Sting to byte[]
This commit is contained in:
Oleg Zhurakousky
2020-04-17 18:54:47 +02:00
parent 8791fc3b4d
commit 7bd84c79a2
12 changed files with 144 additions and 50 deletions

View File

@@ -52,6 +52,7 @@ import static org.assertj.core.api.Assertions.assertThat;
"spring.cloud.function.web.export.sink.url=http://localhost:${my.port}",
"spring.cloud.function.web.export.source.url=http://localhost:${my.port}",
"spring.cloud.function.web.export.sink.name=origin|uppercase",
"spring.cloud.function.web.export.sink.contentType=text/plain",
"spring.cloud.function.web.export.debug=true" })
public class FunctionalExporterTests {

View File

@@ -85,8 +85,8 @@ public class FunctionAutoConfigurationIntegrationTests {
}
// It completed
assertThat(this.forwarder.isOk()).isTrue();
assertThat(this.app.inputs).contains("HELLO");
assertThat(this.app.inputs).contains("WORLD");
assertThat(this.app.inputs).contains("\"HELLO\"");
assertThat(this.app.inputs).contains("\"WORLD\"");
}
@EnableAutoConfiguration