【发布时间】:2011-05-23 08:35:08
【问题描述】:
我有一个IDictionary 类型的属性,其键类型和值类型不是字符串。互联网上和 Spring.Net 中给出的大多数示例都使用字符串作为类型之一。
这里是配置设置:
<property name="DirectoryServiceAgents">
<dictionary key-type="OM.ServiceTier.DTO.Transients.AuthenticationDomainIdentifier, OM.ServiceTier" value-type="OM.ServiceTier.Services.User.Internal.IDirectoryServiceAgent, OM.ServiceTier">
<entry>
<key>
<object type="OM.ServiceTier.DTO.Transients.AuthenticationDomainIdentifier, OM.ServiceTier">
<constructor-arg type="string" value="${activeDirectory.Domain}"/>
</object>
</key>
<value>
<object type="OM.ServiceTier.Services.User.Internal.DirectoryServiceAgent, OM.ServiceTier">
<property name="LDAPPath" value="${activeDirectory.LDAPPath}"/>
<property name="LDAPContainer" value="${activeDirectory.LDAPContainer}"/>
<property name="UserName" value="${activeDirectory.UserName}"/>
<property name="Password" value="${activeDirectory.Password}"/>
</object>
</value>
</entry>
</dictionary>
</property>
我收到以下ConfigurationErrorException:
创建上下文“spring.root”时出错:元素“http://www.springframework.net:value”不能包含子元素“http://www.springframework.net:object”,因为父元素元素的内容模型仅为文本。
我的配置有问题吗?
【问题讨论】:
标签: spring.net