add support for Supplier and Consumer

This commit is contained in:
markfisher
2016-10-14 11:07:37 -04:00
parent 971cc1ebd8
commit b0db0233be
32 changed files with 892 additions and 183 deletions

View File

@@ -68,8 +68,8 @@ public class RestConfiguration {
public HttpHandler httpHandler(FunctionRegistry registry) {
String name = functionProperties.getName();
Function<Flux<String>, Flux<String>> function = (name.indexOf(',') == -1)
? registry.lookup(name)
: registry.compose(StringUtils.commaDelimitedListToStringArray(name));
? registry.lookupFunction(name)
: registry.composeFunction(StringUtils.commaDelimitedListToStringArray(name));
FunctionInvokingHandler handler = new FunctionInvokingHandler(function);
RouterFunction<Publisher<String>> route = RouterFunctions.route(
POST(webProperties.getPath()).and(contentType(TEXT_PLAIN)), handler::handleText);