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).原来的代码Mapper.javaMapperTest.java解决搞了有一个多小时,又是改xml文件又是改数据库,最终是因为当插入成功时返回的是一个null,而int类型默认为0,这个时候就要用Integer类型,因为Integer类型默认为null。修改后Mapper.javaMapperTest