Spring-12 Factory Beans and Methods
static method in Class person
non-static method in personFactory
Spring-13 The P Namespace
注意Constructor 中的Arg 和建立的Bean之间的关系
p: tag 和 property tag 不要同时使用
Spring-14 Setting List Property
In beans.xml file
Insert constructor argument ----> (Right click constructor argument)Insert List Element ---->(Right click list element)Insert Value Element
apple peach pear orange banana
Difference between 'set' and 'list'
'set' remove duplicate value.
Spring-15 Lists of Beans
App.java Jungle jungle =(Jungle)context.getBean("jungle"); System.out.println(jungle);
Result Largest: Animal [name=Richard, type=elephant]Others:Animal [name=Igor, type=lion]Animal [name=Bob, type=snake]Animal [name=Richard, type=elephant]
Spring-16 Inner Beans
Wrong edition
Reason: If you got an bean defined as an inner bean, you cannot refer to it somewhere else
Spring-17 Property map
Insert property(foods)--->Insert props--->Insert prop element
banana bamboo eggs
Spring-18 Arbitrary Maps as Bean Properties
Insert property(animals)--->insert Map--->insert Entity(entity key : lion value-ref: lion)
banana bamboo eggs