我们使用VariablePlaceholderConfigurer
来定义例如db-connection,...
<object name="appConfigPropertyHolder"
type="Spring.Objects.Factory.Config.VariablePlaceholderConfigurer, Spring.Core">
<property name="VariableSources">
<list>
<object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core">
<property name="Location"
value="~\Config\Spring.Properties.config" />
</object>
</list>
</property>
</object>
<db:provider id="projectCockpitDbProvider"
provider="${dbProvider}"
connectionString="${dbConnectionString}" />
有没有办法根据构建配置文件定义属性文件?
像
这样的东西<property name="Location"
value="~\Config\Spring.Properties.{$BuildProfile}.config" />
或
<property name="Location" condition="[Buildprofile]"
value="~\Config\Spring.Properties.config" />
有人有任何想法吗?