我用 Spring.Net 编写了应用程序。当我尝试调用 Spring.Net 的 GetObject("...") 时,我遇到了一个异常:
未定义名为“SystemConfiguration_Workspace_NewWorkspaceAction”的对象:找不到对象 [SystemConfiguration_Workspace_NewWorkspaceAction] 的定义
但是我的 XML 中有名为“SystemConfiguration_Workspace_NewWorkspaceAction”的对象。
<?xml version="1.0" encoding="utf-8" ?>
<spring>
<typeAliases>
<alias name="ContextMenuItemModelAlias" type="ElmoMotionControl.View.Model.ContextMenuItemModel, ElmoMotionControl.View.Model"/>
</typeAliases>
<objects xmlns="http://www.springframework.net" >
<!--<description>An example that demonstrates simple IoC features.</description>-->
<object id="WorkspaceTreeModel" type="ElmoMotionControl.View.Model.ContextMenuModel, ElmoMotionControl.View.Model" >
<property name="ContextMenus" ref="WorkspaceTreeModelDicProp"/>
</object>
<!-- _______________________The dictionary item______________________ -->
<object id ="WorkspaceTreeModelDicProp" type="System.Collections.Generic.Dictionary<string, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<ContextMenuItemModelAlias>>>">
<constructor-arg>
<dictionary key-type="string" value-type="System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<ContextMenuItemModelAlias>>">
<entry key="SystemConfiguration_Workspace" value-ref="SystemConfiguration_Workspace"/>
</dictionary>
</constructor-arg>
</object>
.
.
.
</objects>
</spring>
可能是什么问题?