Use PropertyPlaceholderConfigurer to add external property files to XML configuration files

 

 

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

  <!-- This property is in the grandparent class of PropertyPlaceholderConfigurer -->

        <property name="locations">

  <value>classpath:hibernate.properties</value>

  </property>

  </bean>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327059476&siteId=291194637