出现这种错误,说明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. 【笔记】DDD实战课-人保架构欧创新

    目录 开篇 学好DDD,你能做什么? 基础 领域驱动设计:微服务设计为什么要选择 DDD? DDD的两层设计 DDD与微服务的关系 领域.子域.核心域.通用域和支撑域:傻傻分不清? 领域和子域 核心域 ...

  2. JavaScript 基础学习(二)

    JavaScript 基础学习(二) instanceof方法: var s = "hello"; var i = 8; //typeof 只能判断基本数据类型 alert(typ ...

  3. No.1.2

    列表标签 无序列表 标签名 说明 ul 表示无序列表的整体,用于包裹li标签 li 表示无序列表的每一项,用于包含每一行的内容 有序列表 标签名 说明 ol 表示有序列表的整体,用于包裹li标签 li ...

  4. Source Tree 1、解决打开闪退问题2、解决找不到项目的问题

    闪退问题主要做了两点 1.版本降到3.1.2 下载链接:Sourcetree Download Archives | Sourcetree 2.参考博客做出文件修改参考bigbig猿博客 新建json ...

  5. jmeter的阶梯式加压性能测试 jp@gc - Stepping Thread Group (deprecated)

    当测试需求要求是阶梯型的压力测试场景时,使用该线程组. 比如测试场景是    从100并发开始,每60s加压50并发,直至达到目的并发数(中途发现问题随时停掉),之后保持每60s停止50并发的速率关闭 ...

  6. Dubbo Debug大全

    com.alibaba.dubbo.rpc.RpcException: No provider available from registry 120.25.85.89:2181 for servic ...

  7. IDEA的主题插件

    Xcode-Dark Theme

  8. Unity鼠标点选RenderTexture里渲染的3D模型

    公司的产品有个功能:在主相机之外,另有一个摄像机来渲染不同的3D模型,然后把摄像机的RenderTexture赋值给一个 rawImage.texture,作为2D的UGUI来显示.(应用场景:模型结 ...

  9. FastReport和RDLC报表

    最近在做报表的时候第一次接触到RDLC报表,对比于之前使用的FastReport报表来说,在使用体验上个人目前感觉RDLC灵活性相对较差,尤其是表格的格式多样的时候,不易修改.RDLC应用于格式简单的 ...

  10. Java中finalize()方法的使用

    参考:https://blog.csdn.net/m0_64624615/article/details/126326921 垃圾回收器