码迷,mamicode.com
首页 > 移动开发 > 详细

mybatis配置mapperLocations多个路径

时间:2017-03-21 10:47:27      阅读:2607      评论:0      收藏:0      [点我收藏+]

标签:database   list   cat   factory   perl   XML   pre   cto   location   

<property name="mapperLocations">
      <array>
          <value>classpath*:/mybatis-config.xml</value>
          <value>classpath*:/com/**/sqlmap-*.xml</value>
      </array>
</property>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
      <property name="mapperLocations">
          <array>
              <value>classpath:mybatis/mapper/*.xml</value>
              <value>classpath:mybatis/mapper/database/*.xml</value>
          </array>
      </property>
      <property name="dataSource" ref="dataSource"/>
      <property name="configLocation" value="classpath:mybatis/config/mybatis-config.xml"/>
</bean>
<property name="mapperLocations" >
     <list>
          <value>classpath*:/sqlmap/*.xml</value>
          <value>classpath*:/test/*.xml</value>
     </list>
</property>

 

mybatis配置mapperLocations多个路径

标签:database   list   cat   factory   perl   XML   pre   cto   location   

原文地址:http://www.cnblogs.com/henuyuxiang/p/6592813.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!