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

58595f7e0001504505000279.jpg

58595f7f000131f605000271.jpg

58595f8100017a1a05000224.jpg

执行删除操作的时候爆出没有返回类型错误。可是配置文件中有设定啊。### 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"/>


玄鉴
浏览 1700回答 1
1回答

primos

1,提问的时候注意一下你的编码,比如我这里出错啦2,你把你的目录结构贴出来啊,不然怎么给你调,我通过上面也看不到你的路径啊。。。。。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java