日常报错记录
-
java.lang.IllegalStateException:Optional long parameter 'id' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.
-
出现这种情况主要是方法里面写了参数,但是没有传进去。
-
org.apache.ibatis.binding.BindingException: Parameter 'name' not found. Available parameters are [0, 1, param1, param2]
-
Mybatis方面知识,注解以及规范等。
-
修改之前:
-
修改之后:
-
第二种改法: