【java】Mybatis返回int類型爲空時報錯 attempted to return null from a method with a primitive return type (int)

1、前言       在往常敲代碼的時候沒有留意過int和Integer的區別,今天在敲代碼的時候,ORM框架使用的是Mybatis,一個簡單的查詢,返回查詢的條數。當查詢爲null的時候,就報錯了。java 2、報的錯誤       試圖從具備原始返回類型(int)的方法返回nullweb org.apache.ibatis.binding.BindingException: Mapper me
相關文章
相關標籤/搜索