Hellu,
I am trying to do the following:
Get a static value through a static method out of a running bean and use this as a constructor arugment for a bean.
I thought that I have to to this with "MethodInvokingFactoryBean", but it's not really working.
How should I do this ?
What I now have in my beans.xml:
And the exception I get:Code:<bean id="WorkbenchWindowAdvisor" class="org.ited.mr.ui.core.impl.BasicWorkbenchWindowAdvisor" singleton="false" > <constructor-arg ref="WorkbenchWIndowConfigurator"/> </bean> <bean id="WorkbenchWIndowConfigurator" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass"><value>org.ited.mr.ui.core.impl.BasicWorkbenchAdvisor</value></property> <property name="targetMethod"><value>getConfigurator</value></property> </bean>
Please some advice on this issue ?org.springframework.beans.factory.UnsatisfiedDepen dencyException: Error creating bean with name 'WorkbenchWindowAdvisor' defined in class path resource [beans.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.eclipse.ui.application.IWorkbenchWindowConfigu rer]: Could not convert constructor argument value [org.springframework.util.MethodInvoker$VoidType@1a 220e6] to required type [org.eclipse.ui.application.IWorkbenchWindowConfigu rer]:
Cheers,
Ed


Reply With Quote