If I have @Autowired List beans; and no beans of SomeBeanClass, I get:
@Autowired List beans;
SomeBeanClass
No matching bean of type [SomeBe
If I add (required=false), I get null for beans.
(required=false)
null
beans
Does the field get explicitly set to null or does it simply not get set at all? Try adding an initializer expression
@Autowired List beans = new ArrayList<>();