MyBatis-Spring整合之方式4

直接删除Mybatis的配置文件,修改Beans.xml文件的sqlSessionFactory的参数内容,如下:



    
    
    

修改Mapper.xml的别名,改用路径+类名,如下:


    
    
        insert into users(name,pwd) values(#{name},#{pwd})
    
    
        delete from users where id=#{id}
    

你可能感兴趣的:(MyBatis-Spring整合之方式4)