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

Exception background The resultType = int select count(*) count(*) query result
in mybatis mapper.xml is null, so the above exception occurs. Exception analysis: attempted to return null from a method with a primitive return type (int) try to be int Assignment to null exception solution: 1.select IFNULL(count(*),0) Empty processing, the default is 0 2.resultType = java.lang.Integer The judgment of emptying when calling mapper.java interface in Service Abnormal summary: regardless of resultType Whether it is a wrapper class or a basic data type, the above exception may occur. Blog reference [url]http://blog.csdn.net/iamlihongwei/article/details/72652384 [/url]



















Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326793134&siteId=291194637