Commit 5b4c557
committed
Fix
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 properlyFunctionTypeUtils for FactoryBean
1 parent c1cb638 commit 5b4c557
File tree
2 files changed
+36
-2
lines changed- spring-cloud-function-context/src
- main/java/org/springframework/cloud/function/context/catalog
- test/java/org/springframework/cloud/function/context/catalog
2 files changed
+36
-2
lines changedLines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
447 | 454 | | |
448 | 455 | | |
449 | 456 | | |
| |||
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
849 | 851 | | |
850 | 852 | | |
851 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
852 | 862 | | |
853 | 863 | | |
854 | 864 | | |
| |||
1300 | 1310 | | |
1301 | 1311 | | |
1302 | 1312 | | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
1303 | 1330 | | |
1304 | 1331 | | |
1305 | 1332 | | |
| |||
0 commit comments