参数空指针,根据debug一步一步走,并没有发现参数空指针!
------------------------------这是异常信息------------------------------
java.lang.NullPointerException
at com.imooc.service.impl.UserServiceImpl.queryUserSimplyInfoById(UserServiceImpl.java:118)
at com.imooc.controller.MyBatisCRUDController.queryUserByIdCustom(MyBatisCRUDController.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
------------------------------这是xml配置------------------------------
<mapper namespace="com.imooc.mapper.SysUserMapperCustom" >
<!-- resultType就是不需要配置restmap对应属性参数,但是需要字段与数据库字段保持一致 parameterType为传入参数类型-->
<select id="queryUserSimplyInfoById" resultType="com.imooc.pojo.SysUser"
parameterType="java.lang.String" >
select * from sys_user where id = #{id,jdbcType=VARCHAR}
</select>
<sql id="columns">id,username</sql>
</mapper>
at java.lang.reflect.Method.invoke(Method.java:498)