0
一種簡單的新手問題...我看我如何創建一個字符串對象,但我將如何創建一個int對象?如何創建一個在IOC上下文文件中定義的Int32類型的spring .Net獨立對象?
下面是從我的上下文文件中的XML代碼片斷:
<object id="myString" type="System.String">
<constructor-arg value="foo" />
</object>
<object id="myInt" type="System.Int32">
<<<**** how do I set this ****>>>>
</object>
如果你想要這個能夠注入一些配置值,那麼你應該考慮使用['PropertyPlaceHolderConfigurer'](http://www.springframework.net/doc-latest/reference/html/objects.html #對象 - 工廠placeholderconfigurer)。 – Marijn