attempted to return null from a method with a primitive return type (int)异常的解决
来源:互联网 发布:上海unity3d培训 编辑:程序博客网 时间:2024/05/16 09:24
项目启动正常,执行添加时数据也能保存到数据库中,但报这个异常,org.apache.ibatis.binding.BindingException: Mapper method 'com.krk.gzytj.machineregister.mapper.MachineRgisterMapper.addMachineRegister attempted to return null from a method with a primitive return type (int).,原来是xxMapper.xml文件里写错了:
<select id="addMachineRegister" parameterType="MachineRgister">
insert into MachineRgister(sAreaCode,sHospitalCode,sSupplierCode,sMachineCode,sModel,dDistributeDate,sPUserCode,sPName,iFlag,dUpdateTime)values(#{sAreaCode},#{sHospitalCode},#{sSupplierCode},#{sMachineCode},#{sModel},#{dDistributeDate},#{sPUserCode},#{sPName},#{iFlag},#{dUpdateTime})
</select>
只需把select 替换成insert即可,因为这是执行insert的sql,使用<select id="">当然不合适了。
- attempted to return null from a method with a primitive return type (int)异常的解决
- attempted to return null from a method with a primitive return type (int).
- mybatis -----attempted to return null from a method with a primitive return type (int)
- 关于attempted to return null from a method with a primitive return type (int).报错解决方案
- MyBatis提示getFundBonus attempted to return null from a method with a primitive return type (double)
- 【java】Mybatis返回int类型为空时报错 attempted to return null from a method with a primitive return type (int)
- mybatis返回int类型报错 return null from a method with a primitive return type (int).
- aop.AopInvocationException: null return value from advice does not match primitive return type for
- Return multiple values from a method
- return confirm Cannot return from outside a function or method
- Return a null reference
- hibernate异常Null value was assigned to a property of primitive type setter
- 异常:Null value was assigned to a property of primitive type setter of···
- Spring之AOP奇葩报错:Null return value from advice does not match primitive return type for
- Null value was assigned to a property of primitive type setter of"原因及解决方
- Null value was assigned to a property of primitive type setter问题分析与解决
- Null value was assigned to a property of primitive type setter问题分析与解决
- Null value was assigned to a property of primitive type setter of"原因及解决方
- Python图像处理库:Pillow 初级教程
- Java8 Lambda表达式要点
- STM32——CAN总线通信
- 记录 Duplicate spring bean id dubbo
- 以往链接关联
- attempted to return null from a method with a primitive return type (int)异常的解决
- 游戏如此多娇,骚年怎能不折腰
- 《一刻钟优化MySQL》ISOPHP 2017年会分享内容
- 深度学习框架的比较(MXNet, Caffe, TensorFlow, Torch, Theano)
- 大数据_MapReduce和Hadoop的安装与配置
- 输入法不见了,这样解决更6
- 梦谈——狗爷
- 城市云脑是互联网云脑的节点,城市云脑之间的互补与支撑
- 科普小知识:VR游戏的音效