mybatis报错:nested exception is java.lang.NullPointerException

HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException


type Exception report

message Request processing failed; nested exception is java.lang.NullPointerException

description The server encountered an internal error that prevented it from fulfilling this request.

如图所示:

mybatis报错:nested exception is java.lang.NullPointerException_第1张图片

原因:是因为我在用mybatis映射xml时,其中有一个参数 isFrom 是int类型的,但是在xml中 if 条件判断是 isFrom 不为null,int为基本类型所以不能这样写,把这个类型改为Integer包装类型就OK了,因为传入的参数中也有list集合,导致我一直以为是list集合传递错了或者是其他什么乱七八糟的原因,总之浪费了挺长的时间

你可能感兴趣的:(Java)