Hi there,
Trying to clean up warning messages from my project I have realized that BeanFactoryAwareFunctionRegistry has an issue with a false positive, where log output shows below warning message:
Multiple functional beans were found [], thus can't determine default function definition. Please use 'spring.cloud.function.definition' property to explicitly define it.
The issue is at:
class: BeanFactoryAwareFunctionRegistry
method: public T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes) {
line: 129
code fragment/solution: logger.warn should check if 'functionalBeans' is empty before logging it.
https://github.com/spring-cloud/spring-cloud-function/blob/main/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistry.java#L129
Hi there,
Trying to clean up warning messages from my project I have realized that BeanFactoryAwareFunctionRegistry has an issue with a false positive, where log output shows below warning message:
Multiple functional beans were found [], thus can't determine default function definition. Please use 'spring.cloud.function.definition' property to explicitly define it.The issue is at:
class: BeanFactoryAwareFunctionRegistry
method: public T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes) {
line: 129
code fragment/solution: logger.warn should check if 'functionalBeans' is empty before logging it.
https://github.com/spring-cloud/spring-cloud-function/blob/main/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistry.java#L129