java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for uk.co.argylesoftware.erf.framework.zmoa.persistence.FinanceDOMapper.getFinances
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:593)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:393)
at org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:160)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:37)
at $Proxy75.getFinances(Unknown Source)
at uk.co.argylesoftware.erf.framework.zmoa.services.impl.FinanceServiceMgrImpl.getFinances(FinanceServiceMgrImpl.java:77)
at uk.co.argylesoftware.erf.framework.zmoa.services.impl.FinanceServiceMgrImplTest.testGetFinances(FinanceServiceMgrImplTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0从异常信息来看你Finances属性传了不正确的参数 mapper.xml文件路径和配置文件不匹配 mybatis-config.xml 文件的 mappar 顺序错误了。你要和上面的对应上。