Mapper method 'org.lin.hms.dao.IndentDAO.insertIndent' has an unsupported return type: interface java.util.List
出现这种错误,说明sql语句执行成功,只是返回类型出了问题。

解决办法:
mapper文件中的update,delete,insert语句是不需要设置返回类型的,它们都是默认返回一个int ,所以把返回值类型改成 int。
在DAO 层中改
原来:

改后:

Mapper method 'org.lin.hms.dao.IndentDAO.insertIndent' has an unsupported return type: interface java.util.List的更多相关文章
- Mapper method 'com.xxxx.other.dao.MyDao.getNo attempted to return null from a method with a primitive return type (int)
使用myBatis调用存储过程的返回值,提示错误信息: org.apache.ibatis.binding.BindingException: Mapper method 'com.xxxx.othe ...
- SSM报错:No converter found for return value of type: class java.util.ArrayList at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverter
我使用的是SSM框架,是在编写测试RESTFUL接口的时候出现, @RequestMapping(value = "/selectAll", method = RequestMet ...
- Mybatis 报错Mapper method 'xxx' has an unsupported return type
报错原因: 出现这种错误,说明sql语句执行成功,只是返回类型出了问题. 解决方法: insert.delete.update操作默认返回一个int类型的整数,将增删改的接口改成int或者void即可 ...
- rg.apache.ibatis.binding.BindingException: Mapper method 'com.dao.Cameao.getOnlineDayRation attempted to return null from a method with a primitive return type (float)
本文为博主原创,未经允许不得转载: 异常展示如下: org.apache.ibatis.binding.BindingException: Mapper method 'com.dao.Cameao. ...
- mapper.xml是怎样实现Dao层接口
上午写了一个简单的 从xml读取信息实例化一个Bean对象.下午就开始想mybatis是怎么通过xml文件来实现dao层接口的,一开始想直接用Class.forName(String name)然后调 ...
- org.apache.ibatis.binding.BindingException: Mapper method 'attempted to return null from a method with a primitive return type (long).
一.问题描述 今天发现测试环境报出来一个数据库相关的错误 org.apache.ibatis.binding.BindingException: Mapper method 'attempted to ...
- spring3+structs2整合hibernate4时报org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void sy.dao.impl.UserDaoImpl.setSessionFactory(org.hibernate.SessionFactory);
今天在spring3+structs2整合hibernate4时报如下错误,一直找不到原因: org.springframework.beans.factory.BeanCreationExcepti ...
- delete attempted to return null from a method with a primitive return type (int)
今天被自己给蠢死了 今天在代码中遇到这个错误, 百度翻译一下:映射方法,从一org.system.mapper.child.chmorganizationexaminationmapper.delet ...
- 报错org.apache.ibatis.binding.BindingException: Type interface com.atguigu.mybatis.bean.dao.EmployeeMapper is not known to the MapperRegistry.
报错org.apache.ibatis.binding.BindingException: Type interface com.atguigu.mybatis.bean.dao.EmployeeMa ...
- attempted to return null from a method with a primitive return type (int).
java接口文件 package com.cyb.ms.mapper; import org.apache.ibatis.annotations.Param; public interface Acc ...
随机推荐
- fatal error: openssl/ssl.h: No such file or director
$ sudo apt-get install libssl-dev
- C#动态创建对象和其属性
dynamic contact = new ExpandoObject(); contact.Name = "Patrick Hines"; contact.Phone = &qu ...
- Python3 文件处理相关脚本
对文件相关处理是脚本中最常见的,下面列举几种实用的案例: 批量删除: (1)删除指定目录,指定后缀文件 例:删除目录J:/start下的 .log与.tmp结尾文件 def del_files(pat ...
- fastadmin打包插件
<?php namespace app\command; use think\console\Command; use think\console\Input; use think\consol ...
- moment.js相关知识总结
参考连接:https://www.jianshu.com/p/9c10543420de 1,ant-design-vue控件当中的日期控件 <a-date-picker @change=&quo ...
- OpenStack 虚拟机制作qcow2格式镜像
虚拟机拍摄快照导出1.将虚拟机制作成镜像(即拍摄快照):2.利用该虚机的快照,创建一个快照卷,大小是根据快照的大小自动设置的:3.利用命令将快照卷 upload-to-image 到虚机的快照内 ci ...
- 宽字符集(unicode)操作函数 (转)
字符分类: 宽字符函数 普通C函数 描述 iswalnum() isalnum() 测试字符是否为数字或字母 iswalpha() isalpha() 测试字符是否是字母 iswcntrl() isc ...
- 微信字体大小调整导致的H5页面错乱问题处理
当用户调整微信字体大小时会导致H5页面错乱,解决方案如下: ios:在css中加入-webkit-text-size-adjust: 100% !important; body { -webk ...
- 【Java】dto转json
<dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifac ...
- 浏览器F12,Network中各按钮的作用
Network下 preserve log:勾选,页面发生跳转,接口不丢失:(比如登录成功跳转到首页,登录的接口就没了,勾选Perserve log,会记录跳转前的接口): Disable cache ...