I have a bean
<bean name="api.HelloWorld" class="ru.example.api.HelloWorld"/>
When you call in flow I get an error.
<evaluate expression="api.HelloWorld.test()"/>
How to call?
I have a bean
<bean name="api.HelloWorld" class="ru.example.api.HelloWorld"/>
When you call in flow I get an error.
<evaluate expression="api.HelloWorld.test()"/>
How to call?
If you are using SpEL, you can use this:
<evaluate expression="@'api.HelloWorld'.test()"/>
if you are using OGNL or jboss-el, I don't think it can be done other than using a utility class, like this:
@Component
public class WebFlowUtil {
@Autowired
private ApplicationContext applicationContext;
public Object getBean(String beanName) {
return applicationContext.getBean(beanName);
}
}
then use:
<evaluate expression="webFlowUtil.getBean('api.HelloWorld').test()"/>