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 ...
随机推荐
- Python 面试题整理
一.语言特性 1.什么是Python?使用Python有什么好处?Python和其他语言的区别? Python是一种编程语言,它有对象,模块,线程,异常处理和自动内存管理. 好处:开源.简洁.简单.方 ...
- K8S informer机制
一.informer介绍 Kubernetes基于声明式API的设计理念,所谓声明式API,即告诉Kubernetes Controller资源对象的期望状态,这样为Kubernetes在事件通知后, ...
- redis+token实现一个账号只能一个人登录
自己在闲着没事的时候,突然想到了这么一个小功能,于是决定练习一下,首先想到的是如果一个账号只能一个人登录,可能会出现两个情况,一种是后登录者把前者的账号顶替掉,还有一种就是后者登录的时候会有提示当前账 ...
- [node]启动一个简单的node接口
来自知乎. 需要先安装一个node,安装过程不表. 新建文件: nodeServer.js // 复制这个文件到目录,再输入一下命令: // npm i express // node nodeSer ...
- python 发送 application/x-www-form-urlencoded 类型的数据包
在网上百度了很多,坑的要死,基本不咋好用,自己多尝试了几遍,成功实现了. data 的构建方式 data = f"page={page}&sign={sign}&t={t}& ...
- ubuntu20关机慢: A stop job is running for Snappy daemon
Ubuntu 20 关机超时 问题 A stop job is running for Snappy daemon [1 min 30s ] 解决办法 1.修改以下配置文件超时时间,如下: sudo ...
- 048_Search Lookup
The Problematic Situation:When you add any lookup in Salesforce on a layout from one object to anoth ...
- echars简单使用
引入js <script type="text/javascript" src="js/echarts.js" ></script> 记 ...
- spider_object_01使用正则爬取百度贴吧所有内容保存成html
"""本案例不涉及数据提取,仅指导 网页分页爬取的两种方式 思路非第一种:利用while Ture,传参,然后在设定一个判断条件,案例中用的是如果找不到下一页,循环退出( ...
- 【BOOK】正则表达式
正则表达式 1. 开源中国-正则表达式测试工具:https://tool.oschina.net/regex/ 2. 匹配规则 3. match() 从字符串起始位置匹配正则表达式 若从起始位置匹配不 ...