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

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

artembilan
Copy link
Member

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`
@olegz olegz merged commit 5b4c557 into spring-cloud:main Jan 7, 2025
@olegz olegz added this to the 4.2.1 milestone Jan 7, 2025
onobc added a commit to onobc/stream-applications that referenced this pull request Jan 17, 2025
This commit overrides the `spring-cloud-function` version
manged by `spring-cloud-dependencies` from `4.2.0` to `4.2.1-SNAPSHOT`
in order to pickup spring-cloud/spring-cloud-function#1224
which brings the fix for functions declared as `FactoryBean`.

See spring-cloud#599

Signed-off-by: Chris Bono <[email protected]>
onobc added a commit to onobc/spring-functions-catalog that referenced this pull request Jan 17, 2025
This replaces the use of `spring-cloud-dependencies` in time-spel-log
with `spring-cloud-function-dependencies` in order to:

- narrow dependencies to only what the sample needs

- pick up spring-cloud/spring-cloud-function#1224 which will be
  released earlier than Spring Cloud `2024.0.1` in Spring Cloud Function
  `4.2.1`

Signed-off-by: Chris Bono <[email protected]>
onobc added a commit to onobc/stream-applications that referenced this pull request Jan 17, 2025
This commit overrides the `spring-cloud-function` version
manged by `spring-cloud-dependencies` from `4.2.0` to `4.2.1-SNAPSHOT`
in order to pickup spring-cloud/spring-cloud-function#1224
which brings the fix for functions declared as `FactoryBean`.

See spring-cloud#599
artembilan pushed a commit to spring-cloud/stream-applications that referenced this pull request Jan 17, 2025
This commit overrides the `spring-cloud-function` version
manged by `spring-cloud-dependencies` from `4.2.0` to `4.2.1-SNAPSHOT`
in order to pickup spring-cloud/spring-cloud-function#1224
which brings the fix for functions declared as `FactoryBean`.

See #599
onobc added a commit to onobc/stream-applications that referenced this pull request Jan 23, 2025
This updates spring-cloud-function to 4.2.1 in order
to pickup spring-cloud/spring-cloud-function#1224
which brings the fix for functions declared as `FactoryBean`.
onobc added a commit to onobc/stream-applications that referenced this pull request Jan 23, 2025
This updates spring-cloud-function to 4.2.1 in order
to pickup spring-cloud/spring-cloud-function#1224
which brings the fix for functions declared as `FactoryBean`.
artembilan pushed a commit to spring-cloud/stream-applications that referenced this pull request Jan 23, 2025
This updates spring-cloud-function to 4.2.1 in order
to pickup spring-cloud/spring-cloud-function#1224
which 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants