GH-649 Ignire factory bean names during discovery of a function
Resolves #649
This commit is contained in:
@@ -211,7 +211,8 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (eligibleFunction.size() == 1
|
if (eligibleFunction.size() == 1
|
||||||
&& !eligibleFunction.get(0).equals(functionDefinition)
|
&& !eligibleFunction.get(0).equals(functionDefinition)
|
||||||
&& !functionDefinition.contains("|")) {
|
&& !functionDefinition.contains("|")
|
||||||
|
&& !eligibleFunction.get(0).startsWith("&")) {
|
||||||
functionDefinition = eligibleFunction.get(0);
|
functionDefinition = eligibleFunction.get(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,10 +70,10 @@ public final class FunctionWebUtils {
|
|||||||
Map<String, Object> attributes, String path, String[] acceptContentTypes) {
|
Map<String, Object> attributes, String path, String[] acceptContentTypes) {
|
||||||
path = path.startsWith("/") ? path.substring(1) : path;
|
path = path.startsWith("/") ? path.substring(1) : path;
|
||||||
if (method.equals(HttpMethod.GET)) {
|
if (method.equals(HttpMethod.GET)) {
|
||||||
FunctionInvocationWrapper supplier = functionCatalog.lookup(path, acceptContentTypes);
|
FunctionInvocationWrapper function = functionCatalog.lookup(path, acceptContentTypes);
|
||||||
if (supplier != null) {
|
if (function != null && function.isSupplier()) {
|
||||||
attributes.put(WebRequestConstants.SUPPLIER, supplier);
|
attributes.put(WebRequestConstants.SUPPLIER, function);
|
||||||
return supplier;
|
return function;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user