3
有沒有一種方法可以將類的靜態屬性用作對象定義的工廠方法?在Spring.Net中使用屬性作爲工廠方法
<object id="MyObject" type="MyNamespace.Factory, MyAssembly" factory-method="FactoryObject" />
<!-- "FactoryObject" is a Property (with getter) of the class "Factory" -->
使用這種配置一個異常被拋出:
錯誤創建上下文「spring.root」:無法找到類型匹配的工廠方法」工廠對象[MyNamespace.Factory]
它的工作原理。謝謝 – Fabiano 2010-01-13 12:53:48