- 扫描代码包下mapper
<!-- 自动扫描代码报下mapping.xml文件 --> <property name="mapperLocations" value="classpath:sba/cxb/rwa/**/mapper/*.xml"></property> <!-- 自动扫描mapper目录, 省掉Configuration.xml里的手工配置 --> <property name="mapperLocations" value="classpath*:com/gbanker/golddashi/**/mapper/*.xml" />
- 扫描resources下mapper
<!-- 自动扫描resources下mapping.xml文件 --> <property name="mapperLocations" value="classpath:mapper/*/*.xml"></property>