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}"/>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2021-04-11
  • 2021-08-21
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2021-07-07
  • 2022-01-07
相关资源
相似解决方案