How to make reference link in properties file. For example, I have spring config:
<property name="velocityProperties">
<value>
<entry key="ds.r开发者_如何转开发esource.loader.instance">
<ref bean="databaseVelocityTemplateLoader"/>
</entry>
<entry key="ds.resource.loader.resource.table">
<value>v_template</value>
</entry>
<entry key="ds.resource.loader.resource.keycolumn">
<value>N_ID</value>
</entry>
<value>
</property>
And I want to write this config in file:
ds.resource.loader.resource.keycolumn=N_ID
ds.resource.loader.resource.table=v_template
How to write this ref: ds.resource.loader.instance
?
I'm not sure of a way built into Spring to do this, but you could extend the PropertiesPlaceholderConfigurer and override the convertPropertyValue() method to try to resolve a property value to a bean name before doing the normal property replacement.
精彩评论