0

在ninject等其他 IoC 容器中,您可以非常轻松地设置上下文绑定。我想知道 Spring.net IoC 容器是否支持上下文绑定?

4

1 回答 1

1

您可以轻松地使用 Spring 表达式进行上下文绑定。代替

<object name="myotherobject" ... />

<object name="thisobject">
  <property name="TheService" ref="myotherobject" />

你可以写

<property name="TheService" expr="<whatever spring expression you like>" />

干杯,埃里希

于 2009-04-27T15:21:38.823 回答