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>

 

posted @ 2015-03-24 15:30  sunbylm  阅读(101)  评论(0编辑  收藏  举报