You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JsonPropertyAccessor should be usable out of the box in GraalVM native images by providing proper reflection configuration.
Current Behavior
Evaluating an SpEL expression that invokes a List method like List::contains on a Jackson ArrayNode fails with the following exception message:
org.springframework.expression.spel.SpelEvaluationException: EL1004E: Method call: Method contains(java.lang.String) cannot be found on type org.springframework.integration.json.JsonPropertyAccessor$ArrayNodeAsList
Context
We have a command-line application that invokes various REST endpoints and allows users to specify SpEL expressions to filter the results. We create our SpEL EvaluationContext using the following method:
When a user specifies a filtering expression like someJsonArrayProperty.contains('someValue'), this works fine in the regular Java version of our CLI application, but fails in the native images.
The text was updated successfully, but these errors were encountered:
Fixesspring-projects#8613
If `JsonPropertyAccessor` is registered for SpEL, it would be great
to have it working in native images as well.
Since SpEL is fully based on reflection, expose
`JsonPropertyAccessor$ComparableJsonNode` and `JsonPropertyAccessor$ArrayNodeAsList`
reflection hints for their method invocations from SpEL
**Cherry-pick to `6.0.x`**
Fixes#8613
If `JsonPropertyAccessor` is registered for SpEL, it would be great
to have it working in native images as well.
Since SpEL is fully based on reflection, expose
`JsonPropertyAccessor$ComparableJsonNode` and `JsonPropertyAccessor$ArrayNodeAsList`
reflection hints for their method invocations from SpEL
**Cherry-pick to `6.0.x`**
Fixes#8613
If `JsonPropertyAccessor` is registered for SpEL, it would be great
to have it working in native images as well.
Since SpEL is fully based on reflection, expose
`JsonPropertyAccessor$ComparableJsonNode` and `JsonPropertyAccessor$ArrayNodeAsList`
reflection hints for their method invocations from SpEL
**Cherry-pick to `6.0.x`**
Expected Behavior
JsonPropertyAccessor
should be usable out of the box in GraalVM native images by providing proper reflection configuration.Current Behavior
Evaluating an SpEL expression that invokes a
List
method likeList::contains
on a JacksonArrayNode
fails with the following exception message:Context
We have a command-line application that invokes various REST endpoints and allows users to specify SpEL expressions to filter the results. We create our SpEL
EvaluationContext
using the following method:When a user specifies a filtering expression like
someJsonArrayProperty.contains('someValue')
, this works fine in the regular Java version of our CLI application, but fails in the native images.The text was updated successfully, but these errors were encountered: