spring配置

//PropertyPlaceholderConfigure读取配置文件

<bean class="org.springframwork.beans.factory.config.PropertyPlaceholderConfigure">

  <property name="locations">

    <list>

      <value>classpath:init-config.properties</value>

    </list>

  </property>

</bean>

//enable component scanning(beware that this does not enable mapper scanning!)

<context:component-scan base-package="org.zhuc.mybatis" />

//enable autowire

<context:annotation-config>

原文地址:https://www.cnblogs.com/man-li/p/4362948.html