错误名称:Mapper method 'com.dao.UserMapper.insert attempted to return null from a method with a primitive return type (int).
错误出现原因:使用的标签和内容不符。误将insert写为select。
表名t_user,实体类TUser,属性id、userName、password。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dao.UserMapper" >
<select id="checkLogin" parameterType="com.pojo.TUser" resultType="TUser" >
select * from t_user where user_name = #{userName} and pa