initialize an empty list
This commit is contained in:
parent
56bbfd9644
commit
221131a33c
@ -3,6 +3,7 @@ package com.baeldung.collection;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -21,7 +22,7 @@ public class CollectionsBean {
|
|||||||
|
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
@Qualifier("CollectionsBean")
|
@Qualifier("CollectionsBean")
|
||||||
private List<BaeldungBean> beanList;
|
private List<BaeldungBean> beanList = new ArrayList<>();
|
||||||
|
|
||||||
public CollectionsBean() {
|
public CollectionsBean() {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user