GH-461 Add to register more than one functional class

Similar to the way we allow multiple functions to be listed with 'definition' property, this enhancement allows several functional classes to be deployed

Resolves #461
This commit is contained in:
Oleg Zhurakousky
2020-03-23 14:51:56 +01:00
parent 85000ee084
commit 9434a68bd2
5 changed files with 51 additions and 11 deletions

View File

@@ -160,7 +160,7 @@ public class BeanFactoryAwareFunctionRegistry
if (!routing && this.declaredFunctionDefinitions.size() > 0) {
if (StringUtils.hasText(definition)) {
if (this.declaredFunctionDefinitions.size() > 1 &&!this.declaredFunctionDefinitions.contains(definition)) {
if (this.declaredFunctionDefinitions.size() > 1 && !this.declaredFunctionDefinitions.contains(definition)) {
logger.warn("Attempted to access un-declared function definition '" + definition + "'. Declared functions are '" + this.declaredFunctionDefinitions
+ "' specified via `spring.cloud.function.definition` property. If the intention is to access "
+ "any function available in FunctionCatalog, please remove `spring.cloud.function.definition` property.");