In other IoC containers like ninject you can setup contextual binding pretty easily. I was wondering if contextual binding was supported by the Spring.net IoC container?
You can easily use Spring Expressions to do contextual binding. Instead of
<object name="myotherobject" ... />
<object name="thisobject">
<property name="TheService" ref="myotherobject" />
you may write
<property name="TheService" expr="<whatever spring expression you like>" />
cheers, Erich
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.