通常の状況下で、我々はこのような構成の豆です。
<ビーンID = "CAR1" クラス = "com.gong.spring.beans.Car"> <プロパティ名= "名前"値= "baoma"> </ property>の </ビーン> <ビーンID = "のCaR2" クラス = "com.gong.spring.beans.Car"> <プロパティ名= "名前"値= "benchi"> </ property>の </ビーン> <ビーンID = "CAR3" クラス = "com.gong.spring。 beans.Car "> <プロパティ名="名前」値= "binli"> </ property>の </豆> <豆ID = "学生" クラス = "com.gong.spring.beans.Student"> <プロパティ名= "名前"値= "トム"> </ property>の <プロパティ名= "年齢"値= "12"> </ property>の <プロパティ名= "スコア"値= "98.00"> </ property>の <プロパティ名= "車" REF = "車"> </ property>の </豆> <utilに:リストID = "車"> <refの豆= "CAR1" /> <refの豆= "のCaR2" /> <refの豆= "CAR3" /> </ utilに:リスト>
説明:車は豆、学生の共通セットされ、名前、年齢、スコアがあると車の属性のリスト<車>を入力します。
名前空間の導入後、私たちは設定できます。
<ビーンID = "CAR1" クラス = "com.gong.spring.beans.Car" P:名= "baoma"> </ビーン> <ビーンID = "のCaR2" クラス = "com.gong.spring.beans。カー」P:名= "benchi"> </豆> <豆ID = "CAR3" クラス = "com.gong.spring.beans.Car" P:名= "binli"> </豆> <豆ID = "学生" クラス = "com.gong.spring.beans.Student" P:名 = "トム" P:年齢= "12" P:スコア= "98.00" P:車-REF = "車"> </豆> <UTIL:リストID = "車"> <refの豆= "CAR1" /> <REF豆= "のCaR2" /> <refの豆= "CAR3" /> </ utilに:リスト>
オリジナルの、簡潔なコードに比べて多くの。