<bean id="moreComplexObject" class="example.ComplexObject"> <!-- results in a setAdminEmails(java.util.Properties) call --> <property name="adminEmails"> <props> <prop key="administrator">administrator@example.org</prop> <prop key="support">support@example.org</prop> <prop key="development">development@example.org</prop> </props> </property> <!-- results in a setSomeList(java.util.List) call --> <property name="someList"> <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>an entry</value> </key> <value>just some string</value> </entry> <entry> <key> <value>a ref</value> </key> <ref bean="myDataSource" /> </entry> </map> </property> <!-- results in a setSomeSet(java.util.Set) call --> <property name="someSet"> <set> <value>just some string</value> <ref bean="myDataSource" /> </set> </property> </bean> 这是下的Spring官方文档里的教程给的...
<
bean
id
=
"quartzProperties"
class
=
"java.util.Properties"
>
<
constructor-arg
>
<
props
>
<
prop
key
=
"org.quartz.jobStore.tablePrefix"
>QRTZ_</
prop
>
<
prop
key
=
"org.quartz.jobStore.selectWithLockSQL"
>
SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?
</
prop
>
</
props
>
</
constructor-arg
>
</
bean
>