I am working on a Spring 3.1 MVC application and for one of my scenarios, I had to write two implementations of a DAO. I would like to know how to autowire this in a service
Please one note: previous solution is great and simple, but spring is creating each instance of each bean.
So my solution is to create abstract class VehicleService instead of interface
then in appContext
@Bean
@Primary
VehicleService paymentProviderService()
{
return ...new (your requested instance by your own)...
}