I'm not good at English, sorry.

Please teach the way of injection another class to the same field in parent class and child class.

Version:Spring 2.5.6

For example, there is ClassA that have a field.
Class "Bean" is injected into the field of ClassA by the @Autowired and @Qualifier.

@Component
public class ClassA{
@Autowired
@Qualifier("bean")
protected Bean bean;
}

@Component
public class Bean{
}

@Component
public class ClassB extends ClassA{
}

@Component
public class ExtendsBean extends Bean{
}

I want to do follows.
Class "Bean" is injected into the field "bean" of ClassA,
Class "ExtendsBean" is injected into the field "bean" of ClassB.

Show me how to do it.

I done it as follows. But I don't know this is correct way.

@Component
public class ClassB extends ClassA{
@Autowired
public void setBean(ExtendsBean bean){
super.bean = bean;
}
}

It looks like it act below.
1. field @Autowired injection was done.
2. method @Autowired injection was done.

Is this sequence right in specification?
Is not the injection sequence defined in specifications?