Spring引入properties文件

来源:互联网 发布:时时彩断组软件 编辑:程序博客网 时间:2024/05/18 00:38

1/

<context:property-placeholder location="classpath:properties/jdbc.properties"/><context:property-placeholder location="classpath:properties/log4j.properties"/>



2/

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">          <property name="fileEncoding" value="UTF-8" />           <property name="locations">              <list>                  <value>classpath:properties/jdbc.properties</value>                  <value>classpath:properties/log4j.properties</value>              </list>          </property>      </bean>-->


原创粉丝点击