原因是: <!-- 自动扫描mapping.xml文件 --> <property name="mapperLocations" value="classpath*:com/javen/mapping/*.xml"></property> 需要把classpath 后面加个*号,就可以顺利运行了