If you want a list of references to other named beans you can just use normal Groovy list notation and it will all be resolved properly:
beans {
listHolder(ListHolder){
items = [item1, item2]
}
}
but this doesn't work when the "items" need to be anonymous inner beans, the equivalent of the XML
<bean id="listHolder" class="com.example.ListHolder">
<property name="items">
<list>
<bean class="com.example.Item1" />
<bean class="com.example.Item2" />
</list>
</property>
</bean>
You'd have to do something like
beans {
'listHolder-item-1'(Item1)
'listHolder-item-2'(Item2)
listHolder(ListHolder){
items = [ref('listHolder-item-1'), ref('listHolder-item-2')]
}
}