<insert id="addEmp" parameterType="com.java.entity.Employee"> insert into b_emp values (#{empId,jdbcType=NUMERIC},#{empName,jdbcType=VARCHAR},#{empPassword,jdbcType=VARCHAR},#{empSex,jdbcType=VARCHAR},#{empHiredate,jdbcType=DATE}, #{empPosition,jdbcType=VARCHAR},#{empEducation,jdbcType=VARCHAR},#{empExperience,jdbcType=VARCHAR},#{empPower,jdbcType=VARCHAR},#{empMgr,jdbcType=VARCHAR}, #{empBirth,jdbcType=DATE},#{empProfessional,jdbcType=VARCHAR},#{empBlank,jdbcType=VARCHAR}) </insert>如果报出空值的问题,可以在mapper后添加上jdbcType这个属性,以保证可以传入空值