首页 > 代码库 > Spring配置List和Dictionary
Spring配置List和Dictionary
1、List:
<object name="IOrderService" type="XX.XXX.XXX.BLL.Orders.OrderService, XX.XXX.XXX.BLL">
<property name="ProductService" ref="IProductService" />
<property name="CancelOrderStayDao" ref="CancelOrderStayDao" />
<property name="CacheService" ref="MemcachedService" />
<property name="BanedChangeShippingSkuList">
<list>
<value>331</value>
<value>334</value>
<value>972</value>
<value>0</value>
</list>
</property>
</object>
2、Dictionary:
<!-- AppSettings设置信息 -->
<object id="AppSettings" type="XXXX.Passport.Common.Settings.AppSettings, XXXX.Passport.Common">
<property name="EmailFrom" value="http://www.mamicode.com/${EmailFrom}"/>
<property name="MssUserName" value="http://www.mamicode.com/${MSS_Clinet}"/>
<property name="LoginHelpUrl" value="http://www.mamicode.com/${LoginHelpUrl}"/>
<property name="UserName" value="http://www.mamicode.com/${UserName}"/>
<property name="Password" value="http://www.mamicode.com/${Password}"/>
<property name="Host" value="http://www.mamicode.com/${Host}"/>
<property name="GlobalResourcesAddress" value="http://www.mamicode.com/${GlobalResourcesAddress}"/>
<property name="PassportDomain" value="http://www.mamicode.com/${PassportDomain}"/>
<property name="CookieDomain" value="http://www.mamicode.com/${CookieDomain}"/>
<property name="TimeZoneShift" value="http://www.mamicode.com/${TimeZoneShift}"/>
<property name="RegisterViewDetailUrl" value="http://www.mamicode.com/${RegisterViewDetailUrl}"/>
<property name="CMSBannerKey" value="http://www.mamicode.com/${CMSBannerKey}"/>
<property name="ShowOldPassportLink" value="http://www.mamicode.com/${ShowOldPassportLink}"/>
<property name="EmailServerList">
<dictionary key-type="string" value-type="string">
<entry key="qq.com" value="http://mail.qq.com" />
<entry key="163.com" value="http://mail.163.com" />
<entry key="126.com" value="http://mail.126.com" />
<entry key="gmail.com" value="http://mail.google.com" />
<entry key="hotmail.com" value="http://mail.hotmail.com" />
<entry key="live.com" value="http://mail.live.com" />
<entry key="yahoo.com" value="http://mail.yahoo.com" />
<entry key="aol.com" value="http://mail.aol.com" />
<entry key="mail.ru" value="http://mail.mail.ru" />
<entry key="yandex.ru" value="http://mail.yandex.ru" />
<entry key="foxmail.com" value="http://mail.foxmail.com" />
<entry key="yeah.net" value="http://mail.yeah.net" />
<entry key="sina.com" value="http://mail.sina.com" />
<entry key="sina.cn" value="http://mail.sina.cn" />
<entry key="sohu.com" value="http://mail.sohu.com" />
<entry key="hongkong.com" value="http://mail.hongkong.com" />
<entry key="mail.com" value="http://mail.com" />
<entry key="lycos.com" value="http://mail.lycos.com" />
<entry key="icqmail.com" value="http://www.icqmail.com" />
<entry key="e-mail.ru" value="http://e-mail.ru/" />
<entry key="firstname.com" value="http://www.firstname.com" />
<entry key="onebox.com" value="http://www.onebox.com/" />
<entry key="germanmail.com" value="http://www.germanmail.com/" />
<entry key="vsnl.com" value="http://login.vsnl.com/" />
</dictionary>
</property>
</object>
Spring配置List和Dictionary