Spring propertyConfigurer使用

配置Bean
  1.  <bean id="propertyConfigurer"  
  2. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"  lazy-init="false">  
  3. <property name="locations">  
  4. <list>  
  5. <value>/WEB-INF/jdbc.properties</value>  
  6. </list>  
  7. </property>  
  8. </bean>  

 

引用
  1. <property name="username" value="${jdbc.username}" />  
  2. <property name="password" value="${jdbc.password}" />  

你可能感兴趣的:(spring,bean,Web,jdbc)