I have a question regarding how to implement Marker interface through spring. I need to point my marker interface to its implemented classes. Itself marker interface dont have any of function declaration.
interface A {
/* No Method declaration */
}
@Component("c")
Class B implement A {
void function1(){ .. }
void function2(){ .. }
}
@Component("c")
Class C implement A {
void function3(){ .. }
void function4(){ .. }
}
Now Some where in my business Logic, i would like to use @Autowire though my interface to point any of one implementation.
@Autowired
@Qualifier("b")
A aB;
@Autowired
@Qualifier("c")
A aC;
It dont work. Will you please help to implement in correct way…! I was expecting thorugh reflection it should give me the list of method available in the implemented classes but it dont.
Added More Details
The only thing i would like to do is, I would like to reply IResponse to my business methods, instead of different tyoe. Its ok for me if i would have to @Authowired direct to implementation like
@Autowired B aB;
but i thought if there is some way my IDE and Spring do some logic and when i @Autowired my interface towards implementation then it should be able to pick my Implementation class and should show me the business methods. Its not magic, when i am using qualified. I just want from spring to show me business methods through reflection.