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

使用MyBatis对表执行CRUD操作时链接不上数据库。配置文件出错。

使用MyBatis对表执行CRUD操作时链接不上数据库。配置文件出错。

玄鉴 2016-12-20 22:41:09
执行删除操作的时候爆出没有返回类型错误。可是配置文件中有设定啊。### Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'me.gacl.mapping.userMapper.selectAll'. It's likely that neither a Result Type nor a Result Map was specified.### The error may exist in me/gacl/Mapper/userMapper.xml### The error may involve me.gacl.mapping.userMapper.selectAll-Inline### The error occurred while setting parameters### SQL: select * from users### 配置文件:<!-- 查询全部用户--><select id="selectAll" parameterType="me.gacl.domain.User">select * from users</select>找达到注解的配置文件:### Error building SqlSession.### The error may exist in me.gacl.Mapper.UserMapperI### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource me.gacl.Mapper.UserMapperI可是我配置了啊。ctry也能点过去。<mapper resource="me.gacl.Mapper.UserMapperI"/>
查看完整描述

1 回答

?
primos

TA贡献4条经验 获得超4个赞

1,提问的时候注意一下你的编码,比如

我这里出错啦

2,你把你的目录结构贴出来啊,不然怎么给你调,我通过上面也看不到你的路径啊。。。。。

查看完整回答
反对 回复 2016-12-21
  • 1 回答
  • 0 关注
  • 1659 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信