beans.xml
<bean id="duke" class="Juggler">
<constructor-arg value="#{T(java.util.Random).nextInt(10)}"/>
</bean>
Exceptions:
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 20): Method call: Method nextInt(java.lang.Integer) cannot be found on java.util.Random type
Probably such way you can call only static methods