GH-444 Fixed support for default function lookup

Given that function can be looked up with no definition, the fallback alternative should be 'spring.cloud.function.definition' property

Resolves #444
This commit is contained in:
Oleg Zhurakousky
2020-01-28 15:50:42 +01:00
parent 35d3c45959
commit d334ed609c
3 changed files with 32 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2020 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.
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.util.function.Tuple2;
@@ -42,6 +43,11 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class FunctionDeployerTests {
@Before
public void before() {
System.clearProperty("spring.cloud.function.definition");
}
/*
* Target function `class UpperCaseFunction implements Function<String, String>`
* Main/Start class present, no Spring configuration