1. Error information:
org.apache.ibatis.binding.BindingException: Mapper method 'com.jack.all.mapper.TUserMapper.deleteById attempted to return null from a method with a primitive return type (int). at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:105) ~[mybatis-plus-core-3.2.0.jar:3.2.0] at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61) ~[mybatis-plus-core-3.2.0.jar:3.2.0] at com.sun.proxy.$Proxy57.deleteById(Unknown Source) ~[na:na] at com.jack.all.service.impl.TUserServiceImpl.deleteId(TUserServiceImpl.java:62) ~[classes/:na]
2. Solution: the XML needs to write the corresponding, and the previous update is still performed with select, so an error is reported
<update id="deleteById" parameterType="string"> update t_user set isdelete=1 <where> id=#{id} </where> </update>
Similar Posts:
- [Solved] mybatis-plus getById() Method Error: Expected one result (or null) to be returned by selectOne(), but found: 2
- Cannot change the executortype when there is an existing transaction [How to Solve]
- How to Solve MyBatisPlus Error: Failed to process, please exclude the tableName or statementId
- [Solved] Mybatis: the binding mapper cannot be found Error: Org.apache.ibatis.binding.bindingexception: invalid bound statement (not found)
- com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- [Solved] The bean ‘sysDictService’ could not be injected because it is a JDK dynamic proxy
- [Solved] IllegalArgumentException: object is not an instance of declaring class
- [Solved] Mybatis error: attempted to return null from a method with a primitive return type (int)
- How to Solve JAVA @override error
- @Override must override a superclass method problem solving