出现这种错误,说明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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Mybatis 报错Mapper method 'xxx' has an unsupported return type

    报错原因: 出现这种错误,说明sql语句执行成功,只是返回类型出了问题. 解决方法: insert.delete.update操作默认返回一个int类型的整数,将增删改的接口改成int或者void即可 ...

  4. 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. ...

  5. mapper.xml是怎样实现Dao层接口

    上午写了一个简单的 从xml读取信息实例化一个Bean对象.下午就开始想mybatis是怎么通过xml文件来实现dao层接口的,一开始想直接用Class.forName(String name)然后调 ...

  6. 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 ...

  7. 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 ...

  8. delete attempted to return null from a method with a primitive return type (int)

    今天被自己给蠢死了 今天在代码中遇到这个错误, 百度翻译一下:映射方法,从一org.system.mapper.child.chmorganizationexaminationmapper.delet ...

  9. 报错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 ...

  10. 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 ...

随机推荐

  1. 淘淘商城项目技术点-8:vsftpd

    FTP(文件传输协议)全称是:Very Secure FTP Server.   Vsftpd是linux类操作系统上运行的ftp服务器软件. vsftp提供三种登陆方式:1.匿名登录  2.本地用户 ...

  2. 【转载】ISTQB AL-TA/TTA连载系列06:白盒测试技术的精炼总结

    转载自:https://blog.csdn.net/iteye_13411/article/details/82158591 [概述] 白盒测试,有时候又称为基于结构的测试,特别适用于低级别的测试.根 ...

  3. SHR常用f7[更新ing]

    <field id="unit" name="unit" label="单位" dataType="F7" uip ...

  4. c中遍历lua的表

    //遍历lua表,index为表在栈中的位置 void traverse_table(lua_State* L, int index) { lua_pushnil(L); stack_dump(L); ...

  5. tomcat 2 - 默认连接器精简版

    tomcat 将一个包中所有类使用的错误信息存储在 properties 文件中,每个包有一个  properties 文件.每个 properties 文件都是用 org.apache.catali ...

  6. nginx代理出现上传文件过大解决办法

    1.错误描述 2.错误原因 1.上传文件时,利用localhost访问系统,不会出现这个问题:用域名访问这个系统时,出现这个问题,提示是:请求实体太大 由于Nginx反向代理服务器client_max ...

  7. (jmeter笔记)模拟用户各种场景压测

    插件:standard set 1.jp@gc - Ultimate Thread Group(波浪式压测,最终线程组) Start Threads Count :设置启用并发数 Initial De ...

  8. 数据脱敏java代码

    //前prefix后suffix脱敏 public static String idEncrypt(String number ,Integer prefix, Integer suffix) { i ...

  9. IDEA打包普通java项目并用java命令运行

    IDEA下打包为jar包,普通java项目(非web项目) 效果是将第三方jar包放到一个文件夹中(如lib),这样看起来清晰一些.如下图这种: 1.项目结构. 1.关键:modules 在<o ...

  10. UNIT FIVE TO EIGHT

    内存单元间接表示 mov dl, [0] :直接寻址 mov bx, 0mov dl, [bx]:间接寻址 loop指令 1.语法 loop 标号 2.CPU执行指令过程 ① (cx) ← (cx) ...