这是由于spring-beans.xml中的batch批处理配置所导致的,注释掉BATCH配置的代码就可以返回1了:
<bean >
<property name="mapperLocations" value="classpath*:sql/**/*.xml" />
<property name="dataSource" ref="dataSource" />
</bean>
<bean >
<constructor-arg index="0" ref="sqlSessionFactory" />
<!-- <constructor-arg index="1" value="BATCH" /> -->
</bean>