I would like to implement something similar to Spring Data.
Developer can define some interfaces, add a custom annotation to the interfaces to mark them, (my code w
We do this all the time without incident.
Below is the code for the service bean that will be using the List.
@Service
public class SomeService {
@Autowired
List myInterfaceInstances;
//class stuff
}
Next we have the implementations of the interface.
@Component
public class SomeImpl implements MyInterface {
//class stuff
}
and another one just for good measure...
@Component
public class SomeOtherImpl implements MyInterface {
//class stuff
}