Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value f

mybatis中的映射文件namespace,今天遇到了一个bug,其他的看了都没什么问题,只记得去查看全局映射文件mybatis-config.xml中的这个resource是否配置正确了,却没想起来去看映射文件本身的命名空间,这两个是一一对应的关系,一个不对,电脑也找不到啊,你要告诉电脑正确的信息

 
    
    

但是独独提示Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for UserDaoMapper.deleteUserById
,namespace是全局配置文件能找到的唯一对应的字段,也是映射文件的唯一标识,所以这个一定要对应好啊,






    


    

    

    
        insert into tb_user(
         user_name,
         password,
         name,
         age,
         sex,
         birthday,
         created,
         updated
        )
        values(
        #{userName},
        #{password},
        #{name},
        #{age},
        #{sex},
        #{birthday},
        NOW(),
        NOW()
        );
    

    
        update tb_user
        set
        user_name = #{userName},
        password = #{password},
        name = #{name},
        age = #{age},
        sex = #{sex},
        birthday = #{birthday},
        updated = NOW()
        where
           {id = #{id};
    

    
        delete from tb_user where id = #{id}
    

你可能感兴趣的:(Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value f)