Skip to content

Conversation

artembilan
Copy link
Member

Fixes #3998

The GatewayProxyFactoryBean now deals only with a MethodArgsHolder as a root evaluation context object. There is no #args and #method SpEL variables anymore. However, the gateway.adoc still refer to those.

  • Fix gateway.adoc for a proper expressions and actual wording

Fixes spring-projects#3998

The `GatewayProxyFactoryBean` now deals only with a `MethodArgsHolder` as a root evaluation context object.
There is no `#args` and `#method` SpEL variables anymore.
However, the `gateway.adoc` still refer to those.

* Fix `gateway.adoc` for a proper expressions and actual wording

The XML equivalent looks a little different, since there is no `#this` context for the method argument.
However, expressions can refer to method arguments by using the `#args` variable, as the following example shows:
However, expressions can refer to method arguments by using the `args` property for the `MethodArgsHolder` root object, as the following example shows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding an anchor to ===== Expressions and "Global" Headers and adding a link here to fully describe the holder.

See <<...>> for more information about this root object.

====

The evaluation context has a `BeanResolver` (use `@someBean` to reference other beans), and the `#args` array variable is available.
The evaluation context has a `BeanResolver` (use `@someBean` to reference other beans), and the `args` array property from the `#root` object is available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@garyrussell garyrussell merged commit 8412890 into spring-projects:main Feb 1, 2023
@artembilan artembilan deleted the GH-3998 branch February 1, 2023 19:14
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.

SpelEvaluationException: EL1012E: Cannot index into a null value in @Payload for @MessagingGateway

2 participants