Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FunctionTypeUtils for FactoryBean #1224

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

artembilan
Copy link
Contributor

The function bean can be declared as a FactoryBean, for example with Spring Integration's GatewayProxyFactoryBean. See LogConsumerConfiguration in Spring Functions Catalog project.

  • Fix FunctionTypeUtils to react to the ParameterizedType and check its assignments against Factory bean.
    Then resolves its generic to the proper target function type.
  • Add BeanFactoryAwareFunctionRegistryTests.functionFromFactoryBeanIsProperlyResolved() to verify that FactoryBean<Function<?, ?>> is resolved properly

The function bean can be declared as a `FactoryBean`,
for example with Spring Integration's `GatewayProxyFactoryBean`.
See `LogConsumerConfiguration` in Spring Functions Catalog project.

* Fix `FunctionTypeUtils` to react to the `ParameterizedType`
and check its assignments against `Factory` bean.
Then resolves its generic to the proper target function type.
* Add `BeanFactoryAwareFunctionRegistryTests.functionFromFactoryBeanIsProperlyResolved()`
to verify that `FactoryBean<Function<?, ?>>` is resolved properly
artembilan added a commit to spring-cloud/spring-functions-catalog that referenced this pull request Dec 26, 2024
The PR for Spring Cloud Function spring-cloud/spring-cloud-function#1224
brings the fix for functions declared as `FactoryBean`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant