Reputation: 7367
In my dispatcher-servlet.xml
I defined a bean as follows:
<bean id="worplacementDAO" class="com.mycompany.maventestwebapp.db.dao">
<property name="dataSource" value="dataSource" />
</bean>
Is it possible to inject the bean into a controller via applicationContext
configuration file, without using @Autowired
?
Upvotes: 1
Views: 303
Reputation: 18224
Simple answer - No.
You can implement BeanPostProcessor
to do something with your beans (e.g. inject dependency). Or you can manually register the bean as <bean>
instead of letting component-scan
do that for you. But that is all you can do.
Upvotes: 2