我可以做这样的事情:
<object id="mydb" type="string">
<value>"blah"</value> <-- note that <value> tag does not really exist
</object>
这样我以后可以像这样使用它:
<object id="Someobject" type="Sometype">
<property name="ConnectionString" ref="mydb"/>
</object>
编辑:这是我正在寻找的 SpringFramework.NET 解决方案。看起来 PropertyPlaceholderConfigurer 也存在那里。谢谢大家。