4
votes

I have a Spring Integration project where I am trying to call a method on a bean that takes a String object and Class object as parameters. The class object I want to pass to it is Long[].class but I can't figure out the correct syntax. I've tried various combinations of the following to no avail:

expression="@parser.readValue(payload, T(java.lang.Long[]))"

For now I've simply wrapped the call in another java class (hardcoding the Class type) and call that via SpEL. What is the correct syntax for an array class parameter?

1

1 Answers

3
votes

This works...

...(payload, new java.lang.Long[0].class)