Reputation: 1010
I want to inject a bean using XML configuration. The constructor takes an object of type OrderService
which I get from calling the factory method serviceBroker.getService()
. That method takes a class type as argument. How do I specify that class type in the method call using Spring Expression Language
? Here is what I have right now and it is giving an error when deploying:
<bean id="extendItemRequestProcessor" class="com.site.ExtendItemRequestProcessor">
<constructor-arg type="com.site.service.order.OrderService" value="#{serviceBroker.getService(com.site.service.order.OrderService.class)}"/>
</bean>
Upvotes: 0
Views: 1833