1. <bean id="yamlProperties" class="org.springframework.beans.factory.config.YamlPropertiesFactoryBean">
  2.  
    <property name="resources" value="classpath:config/application-release.yml"/>
  3.  
    </bean>
  4.  
     
  5.  
    <context:property-placeholder properties-ref="yamlProperties"/>
  6.  
     
  7.  
    <property name="driverClassName" value="${spring.datasource.driverClassName}"/>
  8.  
    <property name="url" value="${spring.datasource.url}"/>
  9.  
    <property name="username" value="${spring.datasource.username}"/>
  10.  
    <property name="password" value="${spring.datasource.password}"/>
posted on 2019-07-29 19:33  微笑点燃希望  阅读(4896)  评论(0编辑  收藏  举报
font=white