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 ...
随机推荐
- fftw安装
1. 下载fftw 2.tar -zxvf fftw.tar.gz 3. ./configure --prefix=path --enable-sse2 --enable-avx --enable-f ...
- vue 移动端px转rem
1.安装lib-flexible 终端执行命令:npm i lib-flexible --save 2.在main.js引入lib-flexible 3.终端执行命令:npm install post ...
- vue 3 打印 print-js
1.安装 npm install print-js --save 2.引用 import print from 'print-js' 3.编写打印函数 const enterDialog = asyn ...
- 肖sir__ 代码题 ___华为od练习
www.online1987.com 这个网站,有概率看到机考原题,后续内招,这个网站做到了原题
- Window:下载并安装FileZilla客户端
FileZilla官方网站:https://filezilla-project.org/ 环境 操作系统:Window 10 企业版LTSC;内存:8GB;操作类型:64位. 说明 本人想在腾讯云的系 ...
- 启动 RMAN 客户端并与之交互
启动和退出 RMAN RMAN 可执行文件与数据库一起自动安装,通常与其他数据库可执行文件位于同一目录中.例如,Linux 上的 RMAN 客户端位于$ORACLE_HOME/bin. 您有以下启动 ...
- Android Studio实现数据库的所有操作
采用android studio自带的数据库实现stu数据库和stu表的创建,增删改查和关闭 这是项目的大致结构 主界面 子界面 布局源码 <!-- Main --> <?xml v ...
- 【SSO单点系列】(1):CAS4.0 之环境的搭建
[SSO单点系列](1):CAS4.0 环境的搭建 一.概述 今天开始写CAS相关的第一篇文章,这篇文章主要是关于CAS环境的搭配,提供给刚刚接触CAS的一个入门指南,并演示一个CAS的最简单的实例 ...
- 可视化 之D3 与echarts 对比以及应用场景
可视化:我们想要看出一组数据的大小关系,单看数据显然不够直观.那么我们可以将它转换为一种简单易懂的图表的形式,就可以更加直观的获取数据所传递给我们的信息.这个过程就叫做数据可视化.可视化常用2个前端库 ...
- STM32 获取系统时钟频率
//定义一个RCC_ClocksTypeDef 的结构体 RCC_ClocksTypeDef get_rcc_clock; //调用RCC_GetClocksFreq获取系统时钟状态 RCC_GetC ...