bir*_*rdy 6 java spring spring-mvc spring-3
我有一个在我的xml中定义的属性文件:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/db.properties"></property>
</bean>
Run Code Online (Sandbox Code Playgroud)
我在文件中有一个属性:
someprop = one
Run Code Online (Sandbox Code Playgroud)
题
在我的XML中,我想在bean定义中添加/删除属性.例如:
<bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.internal.url}" />
<!--I want to add/remove the line below based on value in property file-->
<property name="username" value="${jdbc.internal.username}" />
</bean>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12742 次 |
| 最近记录: |