当父类构造函数采用该类型的列表时,如何将 bean 作为构造函数参数注入子类。
@Service
public class Parent{
private List<MyObject> myObjectList;
public Parent(List<MyObject> myObjectList){
this.myObjectList = myObjectList;
}
}
@Service
public class Child extends Parent {
@Autowired
public Child(MyObject myObject){
super( ???? );
}
}