Spring Web Flow: How to call static method from <evaluate />?

marioosh picture marioosh · Nov 23, 2010 · Viewed 7.6k times · Source

I need to call static method of org.hibernate.Hibernate class. How to do that in element of flow ?

Answer

Denis Kniazhev picture Denis Kniazhev · Nov 25, 2010

You can use the following Spring EL construct to evaluate static methods:

<evaluate expression="T(org.hibernate.Hibernate).initialize(yourObject)"/>

See the appropriate Spring EL reference part:

http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/expressions.html#expressions-types