Discover function type from FactoryBean

* Fix spring-integration sample

* Added discoverFunctionTypeFromClass() method to FunctionTypeUtils

* A `FactoryBean` may produce a function instance as well.
Add a logic into `BeanFactoryAwareFunctionRegistry` to discover a function type from the `FactoryBean.getObjectType()`
This commit is contained in:
Oleg Zhurakousky
2019-09-25 10:24:07 -04:00
committed by Artem Bilan
parent bdd4320a59
commit 97bea81836
6 changed files with 84 additions and 9 deletions

View File

@@ -204,7 +204,7 @@ class FunctionArchiveDeployer extends JarLauncher {
ReflectionUtils.doWithMethods(functionClass, new MethodCallback() {
@Override
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
typeRef.set(FunctionTypeUtils.getFunctionTypeFromFunctionMethod(method));
typeRef.set(FunctionTypeUtils.discoverFunctionTypeFromFunctionMethod(method));
}
}, new MethodFilter() {
@Override