# Mapper method ‘...attempted to return null from a method with a primitive return type(int)SS整合错误

Mapper method '…attempted to return null from a method with a primitive return type(int)在配置Mybatis出现这个错误

   
     <select id="deleteUserByUsername" parameterType="String"  >
    	delete from userinfo where username = #{username}
    select>
        
      <select id="selectUserByName" parameterType="String"   resultType="User">
    	select * from userinfo where name like concat('%',#{name},'%')
    select> 

这个代码快的标签弄错了就会出现这个问题 ,第一个代码要改成


   <delete id="deleteUserByUsername" parameterType="String"  >
    	delete from userinfo where username = #{username}
    delete>


你可能感兴趣的:(SSH整合,web.xml)