Results 1 to 1 of 1
Thread: How to use Collection in Springs
- 09-26-2007, 08:36 PM #1
How to use Collection in Springs
The list, map like elements allow properties and arguments of Java type List, Set to be defined and set in Configuration File itself.
Java Code:<bean id="moreComplexObject" class="example.ComplexObject"> <!-- results in a setSomeList(java.util.List) call --> <property name="sampleList"> <list> <value>a list element followed by a reference</value> <ref bean="myDataSource"/> </list> </property> <!-- results in a setSomeMap(java.util.Map) call --> <property name="someMap"> <map> <entry> <key><value>yup an entry</value></key> <value>just some string</value> </entry> <entry> <key><value>yup a ref</value></key> <ref bean="myDataSource"/> </entry> </map> </property> </bean>
Similar Threads
-
How to set null value in Springs configuration file
By Java Tip in forum Java TipReplies: 0Last Post: 03-29-2008, 12:44 PM -
How to set null value in Springs configuration file
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:35 PM -
easy way to study the java springs concept
By kumar84 in forum New To JavaReplies: 1Last Post: 07-17-2007, 03:53 PM -
Problems with collection
By Heather in forum New To JavaReplies: 1Last Post: 07-08-2007, 12:22 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks