为了账号安全,请及时绑定邮箱和手机立即绑定

org.apache.ibatis.builder.IncompleteElementException: Could not find result map org.seckill.dao.SeckillDao.Seckill

at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:358)

at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:296)

at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:109)

at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:718)

at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:688)

at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:683)

at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:183)

at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:44)

at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)

at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)

at com.sun.proxy.$Proxy13.queryById(Unknown Source)

at org.seckill.dao.SeckillDaoTest.queryById(SeckillDaoTest.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)

at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)


正在回答

4 回答

mapper 里没有找到 resultMap ,在 mapper 里加入

<resultMap id="Seckill" type="Seckill">
   <id property="seckillId" column="seckill_id"/>
   <result property="name" column="name"/>
   <result property="number" column="number"/>
   <result property="createTime" column="create_time"/>
   <result property="startTime" column="start_time"/>
   <result property="endTime" column="end_time"/>
</resultMap>

0 回复 有任何疑惑可以回复我~
#1

qq_南瓜_10

还是不行
2018-05-19 回复 有任何疑惑可以回复我~

这个错误怎么解决啊?我也遇到了

0 回复 有任何疑惑可以回复我~

嗯,是的。

0 回复 有任何疑惑可以回复我~

是问报错的原因??


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

org.apache.ibatis.builder.IncompleteElementException: Could not find result map org.seckill.dao.SeckillDao.Seckill

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信